This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes  getRequestURL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark " getRequestURL" Watch " getRequestURL" New topic
Author

getRequestURL

Me Fdo
Ranch Hand

Joined: Jan 12, 2004
Posts: 33
Hi
Could you please someone let me know what's wrong here
getRequestURL(req).toString()
Build Error was getRequestURL(javax.servlet.http.HttpServletRequest ) was undefined for the servlet.

Thanks
Me
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
A quick peek at the javadoc reveals that getRequestURL is a member of HttpServletRequest and takes no parameters.
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
The right way to do it:
(req.getRequestURL()).toString()
HTH
 
GeeCON Prague 2014
 
subject: getRequestURL