This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript 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: 66142
141
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!