Don't write a full URL In the sendRedirect(param) call. Use an URI instead. Do:
response.sendRedirect("/some/place/file.html");
instead of:
response.sendRedirect("http://host.domain:port/some/place/file.html");
-----Ursprungligt meddelande-----
Från: Rafael Alvarez [mailto:[EMAIL PROTECTED]]
Skickat: den 14 juni 2001 00:44
Till: Orion-Interest
Ämne: response.sendRedirect problem
Hi all,
this is the scenary: I have a 2 jsp pages and 2 servlet. The flow is:
pag1.jsp -->(via Post)-->
-->servlet1 -->(via forward) -->
-->servlet2 -->(via response.sendRedirect) -->
--> pag2.jsp
when viewed using some browsers in Mac (IE and Netscape alike), the
redirect sends the url
http://hostname/servlet/servlet2/http//hostname/servlet/servlet2
and I got a 400 Bad Request Error, no matter which url I use in the
response.sendRedirect (as I recall, my last was "foobar/whatever")
On windows and unix browsers works fine.
Any ideas?
--
Best regards,
Rafael mailto:[EMAIL PROTECTED]