tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From René Vangsgaard ML <>
Subject RE: Forwarding with parameters
Date Thu, 24 Jul 2003 12:33:50 GMT
You cannot change protocol inside a reuqest. To change protocol you have to
send a redirect to the browser.

-----Original Message-----
From: Gil Hauer
To: Tomcat Users List
Sent: 24-07-03 13:44
Subject: Forwarding with parameters


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);
        d.forward(request, response);

How can I set new parameters for the target page? Is it as simple as
	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,

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message