How can I get request URL in JSP which is forwarded by Servlet?
If I run following code in JSP,
System.out.println(\"servlet path= \" + request.getSe
To get the current path from within the JSP file you can simply do one of the following:
<%= request.getContextPath() %>
<%= request.getRequestURI() %>
<%= request.getRequestURL() %>
Same as @axtavt, but you can use also the RequestDispatcher constant.
request.getAttribute(RequestDispatcher.FORWARD_REQUEST_URI);