Link to home
Start Free TrialLog in
Avatar of texastemplar
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.getRequestDispatcher(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
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of texastemplar
texastemplar

ASKER

That wont work. Im trying to determine the exact url that the app is being forwarded to.

Any other ideas?
why won't it work?
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