Phil Radden wrote:
> There appears to be a change of behaviour between Tomcat 3.1 and 3.2bX
> regarding the handling of the top page for a servlet.
>
> I have a servlet in ROOT context, and wish a particular file, say index.jsp,
> to be used for requests for 'GET / HTTP/1.0'. In 3.1, this is what happens.
> In 3.2, an HTTP redirect to 'Location: /index.jsp' is issued instead.
>
> Ideally, I'd want the 3.1 behaviour. And failing that, the redirection
> should really be to a fully-qualified URL. Any suggestions on what I should
> try?
>
What's going on is Tomcat is redirecting to the welcome page you have configured
for this directory. The redirect is important because a welcome file can have
relative hyperlinks, and they are resolved to the wrong place under several
different usage cases.
The redirect should be setting an absolute URL in the "Location:" header -- if
it's not, that is a Tomcat bug, because the container is required to create an
absolute URL even if the program specifies a relative one. I will look into it.
> Many thanks
Craig McClanahan