Package javax.portlet

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


    }

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

*
*/
public class TodoPortlet extends GenericPortlet {
    @Override
    public void render(RenderRequest request, RenderResponse response) throws PortletException, IOException {
        PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/todos/todo.html");
        prd.include(request, response);
    }
View Full Code Here

                    + view);
        }

        String include = renderer.render(renderRequest, renderResponse);
        if (include != null) {
            PortletRequestDispatcher requestDispatcher = context
                    .getRequestDispatcher(include);
            requestDispatcher.include(renderRequest, renderResponse);
        }

    }
View Full Code Here

public class JSPHelloUserPortlet extends GenericPortlet {

    public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
        String sYourName = (String) request.getParameter("yourname");
        if (sYourName != null) {
            PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/hello.jsp");
            prd.include(request, response);
        } else {
            PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/welcome.jsp");
            prd.include(request, response);
        }
    }
View Full Code Here

        }
    }

    protected void doHelp(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException {
        rResponse.setContentType("text/html");
        PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/help.jsp");
        prd.include(rRequest, rResponse);
    }
View Full Code Here

        prd.include(rRequest, rResponse);
    }

    protected void doEdit(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException {
        rResponse.setContentType("text/html");
        PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/edit.jsp");
        prd.include(rRequest, rResponse);
    }
View Full Code Here

        navigationRootNodeBean.setChildren(rootNodeChildrenList);

        request.setAttribute("showEmptyCategory", showEmptyCategory);
        request.setAttribute("navigationRootNode", navigationRootNodeBean);

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

        chosenNodeBean.setChildren(nodeChildrenList);

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

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

        { // dispatch only allowed for RenderRequest
            String msg = "Can not call dispatch() during a portlet ActionRequest";
            throw new IllegalStateException(msg);
        }

        PortletRequestDispatcher requestDispatcher
            = _portletContext.getRequestDispatcher(path); //TODO: figure out why I need named dispatcher
        try
        {
            requestDispatcher.include((RenderRequest)_portletRequest,
                                      (RenderResponse)_portletResponse);
        }
        catch (PortletException e)
        {
            if (e.getMessage() != null)
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.