This question shows that when sending information in the request object is updated to reflect the new file. For example, when:
user requests "/ abc" -> servlet is called> forward in /def.jsp
Then in def.jsp ${request.requestURI} will be /def.jsp , not /abc . If you want to get the original requested URI (or any other information such as servlet path, etc.):
request.getAttribute("javax.servlet.forward.request_uri");
Everything is fine, but how can I access this through JSTL. ${javax.servlet.forward.request_uri} does not work. A point is considered an operator, not part of a name. In other cases, this is solved by putting the name in square brackets and quoting it. But there is no map object here, and ${['javax.servlet...']} does not work.
So how?
(I can put it in the βaimlessβ attribute in the servlet, but this is a workaround)
Bozho source share