When a JSP target the Servlet, How will you ensure that the response back from the servlet will target the JSP that invoked?
- Posted by: Arush Verdan
- Posted on: May 24 2004 12:49 EDT
Thanks for replying!
You can tell which JSP targeted a servlet (through a hyperlink or form submission) by looking the HTTP "referer" header:
String refererURL = request.getHeader("referer");
This will be the URL of the page that invoked the servlet.