Package javax.portlet

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


             * 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

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

        {
            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

            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

    }

    /** {@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

    }

    @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

        }
        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

    @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

            NodeBean chosenNodeBean = generateNodeBean(chosenNode, SiteId.fromString(siteId), showEmptyCategory);

            request.setAttribute("showEmptyCategory", showEmptyCategory);
            request.setAttribute("parentNode", chosenNodeBean);

            PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/node.jsp");
            prd.include(request, response);
        }
    }
View Full Code Here

TOP

Related Classes of javax.portlet.PortletRequestDispatcher

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.