This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Get Servlet URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Get Servlet URL" Watch "Get Servlet URL" New topic
Author

Get Servlet URL

Lou Pelagalli
Ranch Hand

Joined: Nov 11, 2003
Posts: 150
    
    1
Hi,

How do I get the url of my servlet?

Thanks!
Lou Pelagalli
Ranch Hand

Joined: Nov 11, 2003
Posts: 150
    
    1
I found it!

req.getRequestURL()

Of course after I ask for help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Get Servlet URL
 
Similar Threads
web.xml url-pattern wildcards?
How to get the servlet's requesting page ?
init and service in same thread?
running servlet after the browser is closed
Problem with calling IncludeAction