tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woods, Jason" <jason.wo...@vignette.com>
Subject getRequestDispatcher() & forward(), Tomcat 3.1
Date Wed, 08 Nov 2000 20:31:58 GMT

If I have 2 contexts defined as such:

path="" docBase="webapps/ROOT"
path="/second" docBase="webapps/second"

And in the filesystem I have:

webapps/ROOT/controller.jsp
webapps/ROOT/second/hello.jsp
webapps/second/hello.jsp

In controller.jsp I call:

application.getRequestDispatcher("/second/hello.jsp").forward(request,respon
se);

This forwards me to webapps/second/hello.jsp instead of
webapps/ROOT/second/hello.jsp.  However, the ServletContext in use is the
correct one (the same as the controller context). 

I get the same behavior if I use:

request.getRequestDispatcher("second/hello.jsp").forward(request,response);

This doesn't happen if the forward is coming from a context with a path
prefix other than "", so it seems to be a special case bug (possibly in
SimpleMapper) or a feature.  What's up?

Thanks,

- Jason




Mime
View raw message