I use Spring MVC for a web site. I need to access a JSP page with the following url
http://127.0.0.1/passwordReset
In the controller for this page, HttpServletRequest request.getRequestURI() produces the following:
/passwordReset
On the page, a custom JSP tag is included the following way:
<jsp:include page="/WEB-INF/views/myTag.jsp" />
This tag extends SimpleTagSupport. In the doTag method, I have the following code
JspContext context = getJspContext();
PageContext pageContext = (PageContext) getJspContext();
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
System.out.println(request.getRequestURI());
and the output is
/WEB-INF/views/passwordReset.jsp
Why is there this difference? How can I get "/passwordReset" from the custom tag?