Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getRequestURL

 
Me Fdo
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A quick peek at the javadoc reveals that getRequestURL is a member of HttpServletRequest and takes no parameters.
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The right way to do it:
(req.getRequestURL()).toString()
HTH
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic