It is stored as a request attribute with the javax.servlet.forward.request_uri key:
<p>URL: ${requestScope['javax.servlet.forward.request_uri']}</p>
Or, if you are still on the obsolete JSP 1.x, which was already updated more than ten years ago, do the following:
<p>URL: <%= request.getAttribute("javax.servlet.forward.request_uri"); %></p>
Balusc
source share