tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Roberts <techi...@ait-web.com>
Subject Re: Forwarding with parameters
Date Thu, 24 Jul 2003 14:54:08 GMT
I forget all the reasons why at the moment, but I use sendRedirect() instead of 
forward().

String target = "page1.jsp?param1=" + val1 +
                 "&param2=" + val2 +
                 "&param3=" + val3;

response.sendRedirect( target );


Hope this helps,

-- 
*******************************************
* Rick Roberts                            *
* Advanced Information Technologies, Inc. *
*******************************************

Gil Hauer wrote:
> Hello,
> 
> I have code in a servlet that, based on transaction status, forwards to
> another target page. The code snippet is:
> 
>         String target = "/index.jsp";
>         ServletContext c = getServletContext();
>         RequestDispatcher d = c.getRequestDispatcher(target);
>         response.setContentType("text/html");
>         d.forward(request, response);
> 
> How can I set new parameters for the target page? Is it as simple as
> setting
> 	String target = "/index.jsp?param=val";
> 
> I ask this since it doesn't seem to work -- that parameter does not seem
> to get set.
> 
> Also, at this point I'm in an https session and I'd like to transfer to
> unencrypted protocol -- how can I do that?
> 
> Thanks in advance,
> Gil



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


Mime
View raw message