Package org.apache.struts2.portlet.util

Examples of org.apache.struts2.portlet.util.PortletUrlHelperJSR286


    protected void before(ActionInvocation invocation) throws Exception {
        invocation.addPreResultListener(this);
        Map ses = ActionContext.getContext().getSession();
        if (ses == null && autoCreateSession) {
            ses = new SessionMap(ServletActionContext.getRequest());
            ActionContext.getContext().setSession(ses);
        }

        if ( ses != null) {
            lock(ses, invocation);
View Full Code Here


        && content_type.indexOf("multipart/form-data") != -1) {
      GaeMultiPartRequest multi = getContainer().inject(
          GaeMultiPartRequest.class);
      request = new GaeMultiPartRequestWrapper(multi, request);
    } else {
      request = new StrutsRequestWrapper(request);
    }

    return request;
  }
View Full Code Here

        DefaultActionMapper defaultActionMapper = new DefaultActionMapper();
        defaultActionMapper.setContainer(container);
        ActionMapping actionMapping = defaultActionMapper.getMapping(request, configManager);


        StrutsResultSupport result = (StrutsResultSupport) actionMapping.getResult();
        assertNotNull(result);
        assertTrue(result instanceof ServletRedirectResult);

        assertEquals("myAction.action", result.getLocation());

        // TODO: need to test location but there's noaccess to the property/method, unless we use reflection
    }
View Full Code Here

        defaultActionMapper.setContainer(container);
        defaultActionMapper.setExtensions(",,");
        ActionMapping actionMapping = defaultActionMapper.getMapping(request, configManager);


        StrutsResultSupport result = (StrutsResultSupport) actionMapping.getResult();
        assertNotNull(result);
        assertTrue(result instanceof ServletRedirectResult);

        assertEquals("myAction", result.getLocation());

        // TODO: need to test location but there's noaccess to the property/method, unless we use reflection
    }
View Full Code Here

        DefaultActionMapper defaultActionMapper = new DefaultActionMapper();
        defaultActionMapper.setContainer(container);
        ActionMapping actionMapping = defaultActionMapper.getMapping(request, configManager);


        StrutsResultSupport result = (StrutsResultSupport) actionMapping.getResult();
        assertNotNull(result);
        assertTrue(result instanceof ServletRedirectResult);

        assertEquals("myAction.action", result.getLocation());

        // TODO: need to test location but there's noaccess to the property/method, unless we use reflection
    }
View Full Code Here

        defaultActionMapper.setContainer(container);
        defaultActionMapper.setExtensions(",,");
        ActionMapping actionMapping = defaultActionMapper.getMapping(request, configManager);


        StrutsResultSupport result = (StrutsResultSupport) actionMapping.getResult();
        assertNotNull(result);
        assertTrue(result instanceof ServletRedirectResult);

        assertEquals("myAction", result.getLocation());

        // TODO: need to test location but there's noaccess to the property/method, unless we use reflection
    }
View Full Code Here

  /**
   * reserved method parameter
   */
  public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
    ActionMapping mapping = super.getMapping(request, configManager);
    if (null != mapping) {
      String method = request.getParameter(methodParam);
      if (StringUtils.isNotEmpty(method)) {
        mapping.setMethod(method);
      }
    }
    return mapping;
  }
View Full Code Here

        ServletActionContext.setRequest(request);
        ServletActionContext.setResponse(response);
        ServletActionContext.setServletContext(servletContext);

        ActionMapping mapping = null;
        return dispatcher.getContainer()
           .getInstance(ActionProxyFactory.class)
           .createActionProxy(
            namespace,
            actionName,
View Full Code Here

              .getValue().toString(), invocation));
        }
      }
    }

    StringBuffer tmpLocation = new StringBuffer(actionMapper.getUriFromActionMapping(new ActionMapping(actionName,
        namespace, method, null)));
    UrlHelper.buildParametersString(requestParameters, tmpLocation, "&");

    setLocation(tmpLocation.toString());
View Full Code Here

            fullPath.append(namespace).append("/");
        } else {
            fullPath.append("/");
        }
        fullPath.append(defaultAction);
        ActionMapping mapping = new ActionMapping();
        mapping.setName(getActionName(fullPath.toString()));
        mapping.setNamespace(getNamespace(fullPath.toString()));
        if(method != null) {
          mapping.setMethod(method);
        }
        actionMap.put(portletMode, mapping);
    }
View Full Code Here

TOP

Related Classes of org.apache.struts2.portlet.util.PortletUrlHelperJSR286

Copyright © 2018 www.massapicom. 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.