Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getRequestURI  RSS feed

 
Steve Mutonshi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when my servlet filter intercepts request, I did a "req.getRequestURI". When I click a "submit" button, it calls "submit.do" action (struts). To my surprise, the print out of "req.getRequestURI" includes some JSP pages that are unrelated to this "submit.do". So I am wondering ---

If "my.jsp" includes another "another.jsp" in its content, when you click "submit" and it forwards to "my.jsp", does ""req.getRequestURI" return "another.jsp" in addition to "my.jsp" ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getRequestURI() will return the URI of the current request, not the JSP page from which it was submitted.

You'll have to give us more information to figure out why you are seeing what you are seeing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!