Package javax.portlet

Examples of javax.portlet.PortletRequestDispatcher


    private String PFX_BLOG_AUTHOR = "pfx.url.author";
    private static final Logger log = LoggerFactory.getLogger(CommunityPortlet.class);

    @Override
    protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
        PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/community.jsp");
        prd.include(request, response);
    }
View Full Code Here


            String pfxBlogAuthor = portletPreferences.getValue(PFX_BLOG_AUTHOR, "");

            RssReaderBean gateInBlogRssReader = makeReaderBean(urlRssBlog, urlContentBlog, 2, pfxBlogAuthor);
            request.setAttribute("blogRSSBean", gateInBlogRssReader);

            PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/feedBlog.jsp");
            prd.include(request, response);
        } else if ("vimeo".equals(contentType)) {
            String urlRssVimeo = portletPreferences.getValue(URL_RSS_VIMEO, DEFAULT_URL);
            String urlContentVimeo = portletPreferences.getValue(URL_CONTENT_VIMEO, DEFAULT_URL);

            RssReaderBean gateInVimeoRssReader = makeReaderBean(urlRssVimeo, urlContentVimeo, 2, null);
            request.setAttribute("vimeoRSSBean", gateInVimeoRssReader);

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

public class HtmlPresentationPortlet extends GenericPortlet {
  private static final Logger logger = Logger.getLogger(HtmlPresentationPortlet.class);
 
  public void doView(RenderRequest request,RenderResponse response) throws PortletException,IOException {
    PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/portlets/htmlpresentation/index.jsp");
    dispatcher.include(request, response);
  }
View Full Code Here

  public void doView(RenderRequest request,RenderResponse response)
      throws PortletException,IOException {
    Set<String> portlets = Portal.getPortletSet();

    request.setAttribute("portlets", portlets);
    PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/view.jsp");
    dispatcher.include(request, response);
  }
View Full Code Here

  public void doView(RenderRequest request,RenderResponse response)
      throws PortletException,IOException {
    Principal user = request.getUserPrincipal();
    if (user == null) {
      PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/login.jsp");
      dispatcher.include(request, response);
    } else {
      request.setAttribute("user", user);
      PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/logged.jsp");
      dispatcher.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

    /** {@inheritDoc} */
    public void include(String path) throws IOException {
        if (isRenderRequest) {
            try {
                PortletRequestDispatcher rd = context.getRequestDispatcher(path);

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

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

        }

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

        }

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

        }

        if (helpPage != null)
        {
            PortletContext context = getPortletContext();
            PortletRequestDispatcher rd = context.getRequestDispatcher(helpPage);
            rd.include(request, response);
        }
        return;
    }
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.