Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get the URL from an HttpServletRequest 1

Status
Not open for further replies.

OhioSteve

MIS
Mar 12, 2002
1,352
0
0
US
My .jsp pages all call the post method of a servlet. Here is the method's signature:

public void doPost(HttpServletRequest req, HttpServletResponse res)

My servlet needs to learn the caller's url. Several online sources suggest this approach:

String url="";
url=req.getRequestURL().toString();

Unfortunately that returns the *servlet's* url. I want the caller's url.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top