Package com.dotcms.repackage.org.apache.struts.action

Examples of com.dotcms.repackage.org.apache.struts.action.ActionMapping


        //************************************************************
        //*****REGISTER THE ACTION REQUIRED BY THE STRUTS PORTLET*****
        //************************************************************
        //Creating an ActionMapping Instance
        ActionMapping actionMapping = new ActionMapping();

        //Configure the instance
        actionMapping.setPath( "/ext/strutshello/view_hello" );
        actionMapping.setType( "com.dotmarketing.osgi.portlet.HelloWorldAction" );

        //Create and register the forwards for this mapping
        registerActionForward( context, actionMapping, "portlet.ext.plugins.hello.world.struts", "/ext/strutshelloworld/view.jsp", false );
        registerActionForward( context, actionMapping, "portlet.ext.plugins.hello.world.struts.max", "/ext/strutshelloworld/view_hello.jsp", false );

View Full Code Here


    ActionResponseImpl resImpl = (ActionResponseImpl)res;

    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();
    HttpServletResponse httpRes = resImpl.getHttpServletResponse();

    ActionMapping mapping = processMapping(httpReq, httpRes, path);
    if (mapping == null) {
      return;
    }

    if (!processRoles(httpReq, httpRes, mapping)) {
      return;
    }

    ActionForm form = processActionForm(httpReq, httpRes, mapping);
    processPopulate(httpReq, httpRes, form, mapping);
    if (!processValidateAction(httpReq, httpRes, form, mapping)) {
      return;
    }

    PortletAction action =
      (PortletAction)processActionCreate(httpReq, httpRes, mapping);
    if (action == null) {
      return;
    }

    PortletConfigImpl portletConfig =
      (PortletConfigImpl)req.getAttribute(WebKeys.JAVAX_PORTLET_CONFIG);

    try {
      action.processAction(mapping, form, portletConfig, req, res);
    }
    catch (Exception e) {
      String exceptionId =
        WebKeys.PORTLET_STRUTS_EXCEPTION + StringPool.PERIOD +
          portletConfig.getPortletId();

      req.setAttribute(exceptionId, e);
    }

    String forward =
      (String)req.getAttribute(WebKeys.PORTLET_STRUTS_FORWARD);

    if (forward != null) {
      String queryString = StringPool.BLANK;

      int pos = forward.indexOf("?");
      if (pos != -1) {
        queryString = forward.substring(pos + 1, forward.length());
        forward = forward.substring(0, pos);
      }

      ActionForward actionForward = mapping.findForward(forward);

      if ((actionForward != null) && (actionForward.getRedirect())) {
        if (forward.startsWith("/")) {
          PortletURLImpl forwardURL =
            (PortletURLImpl)resImpl.createRenderURL();
View Full Code Here

  public void process(HttpServletRequest req, HttpServletResponse res)
    throws IOException, ServletException {

    String path = super.processPath(req, res);

    ActionMapping mapping =
      (ActionMapping)moduleConfig.findActionConfig(path);

    if ((mapping == null) && !path.startsWith(_PATH_WSRP)) {
      String lastPath = getLastPath(req).toString();
View Full Code Here

        return null;
      }
    }


    ActionMapping mapping =
      (ActionMapping)moduleConfig.findActionConfig(path);

    if (path.startsWith(_PATH_WSRP)) {
      path = _PATH_WSRP;
    }
    else {
      path = mapping.getPath();
    }

    // Authenticated users must have at least one role

    if (user != null) {
View Full Code Here

        lastPath, _PATH_PORTAL_PUBLIC_LAYOUT, _PATH_PORTAL_LAYOUT);
    }

    Map parameterMap = (Map)ovp.getValue();

    ActionMapping mapping =
      (ActionMapping)moduleConfig.findActionConfig(lastPath);

    if (parameterMap == null) {
      return defaultPathSB;
    }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.struts.action.ActionMapping

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.