Is there a way to get the URI of a JSP that sent a particular GET/POST request to a Servlet? I know of the request.getRequestURI()
function within a Servlet, but that is just returning the URI of the Servlet itself.
For example:
Let's say that index.jsp sent the request to the Servlet SampleServlet. I want to get the URI of the index.jsp file. I haven't found a way to do it, any help would be appreciated.
Edit:
For those curious, it's just request.getHeader('referer');
. Thanks to Vinay Sajip for that!