Hi,

Use RequestDispatcher (RD) and request.setAttribute().

public void doView (RenderRequest request, RenderResponse response)
  |   throws PortletException, IOException
  | {
  |   response.setContentType("text/html");
  |   request.setAttribute("myAttr", "myValue");
  |   PortletRequestDispatcher rd = 
getPortletContext().getRequestDispatcher("another.jsp");
  |   rd.include(request,response);
  | }

The point is to set up the content type of a response (very likely it's 
text/html) *and* use RD.include() as forward() is not allowed.

BTW, You may find this and other answers in a very valuable book - 
http://www.manning.com/books/hepper. It's distributed at no charge (!)

-- 
Jacek Laskowski
http://www.laskowski.org.pl

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to