texastemplar
asked on
View final URL in Servlet RequestDispatcher forward
Im using Java servlets and Im using the following code to perform a forward:
RequestDispatcher rd = request.getRequestDispatch er(url);
rd.forward(request, response);
My question is: How do I view the final url that the app is forwarding to? I want to see the url after any contexts or anything else has been pre-pended to it. I want to see where the app is actually being forwarded to.
For instance, if I pass in home.html as my url variable, how do I determine what the url variable will look like when RequestDispatcher gets finished with it?
Any help is greatly appreciated!!!
Ive been stuck on this for a while now....:(
Thank you,
John
RequestDispatcher rd = request.getRequestDispatch
rd.forward(request, response);
My question is: How do I view the final url that the app is forwarding to? I want to see the url after any contexts or anything else has been pre-pended to it. I want to see where the app is actually being forwarded to.
For instance, if I pass in home.html as my url variable, how do I determine what the url variable will look like when RequestDispatcher gets finished with it?
Any help is greatly appreciated!!!
Ive been stuck on this for a while now....:(
Thank you,
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
why won't it work?
ASKER
I figured it out. The app Im working with had a default error page setup in web.xml so I commented it out and ran the app. This allowed me to see Apache's error page instead of the applications error page. The default error page that Apache uses showed me the url that the RequestDispatcher.forward was creating.
which would be the value of the 'url' variable wouldn't it?
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
ASKER
Any other ideas?