[jboss-user] [JBoss Portal] - Passing parameters to JSP included
nilsonp
do-not-reply at jboss.com
Tue Mar 10 18:05:00 EDT 2009
Hi.
Iôm use Jboss Portal 2.7.0 GA, and my web application consists of:
portlet class:
| public class TestPortlet extends GenericPortlet {
|
| protected void doView(RenderRequest request, RenderResponse response)
| throws PortletException, IOException {
|
| PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/uno.jsp?MiParametro=47");
| prd.include(request, response);
| }
|
| }
|
jsp page "uno.jsp":
| <body>
| <jsp:include page="/jsp/dos.jsp" flush="true">
| <jsp:param name="otroParametro" value="40" />
| </jsp:include>
| </body>
|
jsp page "dos.jsp":
| <body>
| <%out.println("MiParametro: "+request.getParameter("MiParametro"));
| out.println("otroParametro: "+request.getParameter("otroParametro"));
| %>
| </body>
|
and xml file "portlet.xml":
| <portlet>
| <portlet-name>PruebaPortlet</portlet-name>
| <portlet-class>test.portlettest.TestPortlet</portlet-class>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>view</portlet-mode>
| </supports>
| <portlet-info>
| <title>Prueba Portlet</title>
| </portlet-info>
| </portlet>
|
when displaying the page containing the portlet, the result is:
anonymous wrote : MiParametro: 47 otroParametro: null
Does anyone know how can this problem be solved?
would greatly appreciate any responses that guide me to solve it.
Nilson
PS. please excuse my English
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216781#4216781
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216781
More information about the jboss-user
mailing list