[jboss-user] [JBoss Portal] - Re: How to show my JSP page in a portlet.
mmontoni
do-not-reply at jboss.com
Tue Oct 17 10:06:41 EDT 2006
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.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978806#3978806
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978806
More information about the jboss-user
mailing list