Hi All,
Was experimenting with response.sendRedirect(), while reading the HFSJ, for sometime. Stuck with following observations.
1. When the server sends back the response (that resource has been moved) the response status is 302 and not 301 as in HFSJ. I understand that the browser behaves in same way for both of them. Want to know the exact status message, any help ?
2. When i used a complete URL (i.e.
http://google.com), with sendRedirect(), the browser DID made a second request to the google. However, when i used relative URL (starting with/without forward slash) there is no second request. In one sentence, the container seems to understnad that the new URL is from itself and sent back the new content (instead of asking the client to make a second request). I tried to find out if this is specified in spec but didnt find any. Is this vendor specific ?
I am using
tomcat 5.5.
Awaiting your reply...
Thanks and Seasons greetings,
- Ari
[ December 29, 2008: Message edited by: Ari Jeremy ]