[jboss-user] [JBoss Portal] - Re: How to show my JSP page in a portlet.

spadassin do-not-reply at jboss.com
Wed Oct 25 08:55:35 EDT 2006


"mmontoni" wrote : Hi,
  | 
  | you need a .jsp page that you want to display and whithin your portlet in your .java class you can do the following:
  | 
  |   | protected void doView(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException, UnavailableException
  |   |    {
  |   |       rResponse.setContentType("text/html");
  |   | 
  |   |       String sPage = (String) rRequest.getParameter("page");
  |   | 
  |   |       if(sPage != null)
  |   |       {
  |   |          PortletRequestDispatcher prd = getPortletContext ().getRequestDispatcher("/WEB-INF/jsp/construction.jsp");
  |   |          prd.include(rRequest, rResponse);
  |   |       }
  |   |       else
  |   |       {
  |   |          PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/view.jsp");
  |   |          prd.include(rRequest, rResponse);
  |   |       }
  |   | 
  |   |    }
  |   | 
  | 
  | I hope it helps...
  | 
  | --Mariella.



Hello, 

I saw your example but I have a question.

How to make to integrate internationalization in this Portlet? Can you give me an example of internationalized Portlet? 

Thank you




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980688#3980688

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980688



More information about the jboss-user mailing list