Examples of ForwardConfig


Examples of org.apache.struts.config.ForwardConfig

    // Third module (custom forwardPattern)
    public void testForwardURL3() {

        request.setAttribute(Action.APPLICATION_KEY, appConfig3);
        request.setPathElements("/myapp", "/3/action.do", null, null);
        ForwardConfig forward = null;
        String result = null;

        // redirect=false, contextRelative=false
        forward = appConfig3.findForwardConfig("moduleForward");
        assertNotNull("moduleForward found", forward);
View Full Code Here

Examples of org.apache.struts.config.ForwardConfig

        // Calculate the appropriate URL
        StringBuffer url = new StringBuffer();
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        if (forward != null) {
            ForwardConfig fc = config.findForwardConfig(forward);
            if (fc == null) {
                throw new MalformedURLException(messages.getMessage("computeURL.forward", forward));
            }
            if (fc.getRedirect()) {
                redirect = true;
            }
            if (fc.getPath().startsWith("/")) {
                url.append(request.getContextPath());
                url.append(forwardURL(request, fc));
            } else {
                url.append(fc.getPath());
            }
        } else if (href != null) {
            url.append(href);
        } else if (action != null) {
        url.append(getActionMappingURL(action, pageContext));
View Full Code Here

Examples of org.g4studio.core.mvc.xstruts.config.ForwardConfig

    // Process forwards extensions.
    ForwardConfig[] forwards = config.findForwardConfigs();

    for (int i = 0; i < forwards.length; i++) {
      ForwardConfig forward = forwards[i];

      processForwardExtension(forward, config);
    }

    for (int i = 0; i < forwards.length; i++) {
      ForwardConfig forward = forwards[i];

      // Verify that required fields are all present for the forward
      if (forward.getPath() == null) {
        handleValueRequiredException("path", forward.getName(), "global forward");
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.