Examples of PortletRequestDispatcher


Examples of com.dotcms.repackage.javax.portlet.PortletRequestDispatcher

  }

  protected void include(String path, RenderRequest req, RenderResponse res)
    throws IOException, PortletException {
   
    PortletRequestDispatcher prd = null;
    if(useWEBINFDIR){
      prd =
        getPortletContext().getRequestDispatcher(
          "/WEB-INF" + path);
    }else{
    prd =
      getPortletContext().getRequestDispatcher(
        Constants.TEXT_HTML_DIR + path);
    }
    if (prd == null) {
      _log.error(path + " is not a valid include");
    }

    prd.include(req, res);

    if (_copyRequestParameters) {
      PortalUtil.clearRequestParameters(req);
    }
  }
View Full Code Here

Examples of javax.portlet.PortletRequestDispatcher

    }

    protected void doHelp(RenderRequest request, RenderResponse response) throws PortletException, IOException {

        ActionContext.getContext().put("template", helpFileName);
        PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(mockHelpFileName);
        try {
            rd.include(request, response);
        } catch (PortletException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of javax.portlet.PortletRequestDispatcher

             * stack.
             */
            OgnlValueStack stack = ActionContext.getContext().getValueStack();
            request.setAttribute(ServletActionContext.WEBWORK_VALUESTACK_KEY, stack);

            PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(template);
            rd.include(request, response);

            ActionContext.setContext(null);

        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

Examples of javax.portlet.PortletRequestDispatcher

        }
       
        if (previewPage != null)
        {
            PortletContext context = getPortletContext();
            PortletRequestDispatcher rd = context.getRequestDispatcher(previewPage);
            rd.include(request, response);
        }
       
        return;
    }
View Full Code Here

Examples of javax.portlet.PortletRequestDispatcher

        {
            locale = Locale.getDefault();
        }
        request.setAttribute("currentLocale", locale.toString());

        PortletRequestDispatcher rd = context.getRequestDispatcher("/WEB-INF/view/locale-list.jsp");
        rd.include(request, response);
    }
View Full Code Here

Examples of javax.portlet.PortletRequestDispatcher

            doInclude(path);
            return;
        }

        try {
            PortletRequestDispatcher rd = getPortletContext()
                    .getRequestDispatcher(path);

            if (rd == null) {
                throw new IOException(
                        "No portlet request dispatcher returned for path '"
                                + path + "'");
            }

            rd.forward(request, response);
        } catch (PortletException e) {
            throw new IOException("PortletException while including path '"
                    + path + "'.", e);
        }
    }
View Full Code Here

Examples of javax.portlet.PortletRequestDispatcher

    }

    /** {@inheritDoc} */
    public void doInclude(String path) throws IOException {
        try {
            PortletRequestDispatcher rd = getPortletContext()
                    .getRequestDispatcher(path);

            if (rd == null) {
                throw new IOException(
                        "No portlet request dispatcher returned for path '"
                                + path + "'");
            }

            rd.include(request, response);
        } catch (PortletException e) {
            throw new IOException("PortletException while including path '"
                    + path + "'.", e);
        }
    }
View Full Code Here

Examples of javax.portlet.PortletRequestDispatcher

    }

    @Override
    public void dispatch(String path) throws IOException
    {
      final PortletRequestDispatcher requestDispatcher =
        ((PortletContext)getContext()).getRequestDispatcher(path);
      try
      {
        requestDispatcher.include((RenderRequest)getRequest(), (RenderResponse)getResponse());
      }
      catch (final PortletException e)
      {
        if (e.getMessage() != null)
        {
View Full Code Here

Examples of javax.portlet.PortletRequestDispatcher

        }
        if (!(this.portletRequest instanceof RenderRequest))
        {
            throw new IllegalArgumentException("Only RenderRequest can be dispatched");
        }
        PortletRequestDispatcher portletRequestDispatcher = this.portletContext.getRequestDispatcher(requestURI);
        try
        {
            portletRequestDispatcher
                    .include((RenderRequest) this.portletRequest, (RenderResponse) this.portletResponse);
        }
        catch (PortletException e)
        {
            if (e.getMessage() != null)
View Full Code Here

Examples of javax.portlet.PortletRequestDispatcher

    @Override
    protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
        headerBean.setNodeLevel(getNodeLevel(request));
        request.setAttribute("headerbean", headerBean);
        PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/header.jsp");
        prd.include(request, response);
    }
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.