This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes absolute or relative Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "absolute or relative" Watch "absolute or relative" New topic
Author

absolute or relative

suman deb
Ranch Hand

Joined: Jul 14, 2005
Posts: 54
What URL (absolute or relative) is used in RequestDispatcher forward ?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

that depends on whether you give a relative or absolute reference to the resource.
Yuriy Zilbergleyt
Ranch Hand

Joined: Dec 13, 2004
Posts: 429
With the RequestDispatcher, "absolute" is really relative to your web application root. If its the ServletContext's RequestDispatcher, you have to use absolute. With the request's RequestDispatcher you can use relative to the request URI if you leave out the "/" at the beginning.

-Yuriy
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: absolute or relative
 
It's not a secret anymore!