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  getRequestURL 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 " 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getRequestURL
 
Similar Threads
HttpServletRequest
how to tell if a servlet forwarded the user to this JSP
Cookie setting
Request.ServerVariables()
how to get the browser url