You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by steve loh <sl...@kiala.com> on 2004/10/15 10:19:06 UTC

How to redirect or forward a page

I encounter a problem in redirecting/forwarding a page in jetspeed. I
know how to forward page between a same portlet by using setTemplate
method. But I can't get to forward to another URL. I have try two ways,
by redirecting in action class and in jsp page, they just don't work:

**Action class**
public void doPrintlabel(RunData rundata, Portlet portlet) {
    rundata.getResponse().sendRedirect("http://www.google.com");
}
 

**jsp page in a portlet**
<% response.sendRedirect("http://www.google.com"); %>
or 
<jsp:forward page="http://www.google.com" / >

In both case, the error I received says that the page cannot be
redirected because the response header has been sent. How can I bypass
this? Any suggestion on page redirect/forward will be helpful! Thanks!


This e-mail (including any attachments) may contain information which is privileged or confidential or constitute non-public information. It is to be conveyed only to the intended recipient(s). If you received this e-mail in error, please notify the sender immediately by e-mail or telephone and delete the e-mail from your system without reading, copying or disclosing its contents to any other person.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org