Problem
This is a follow-up to yesterday\'s (unanswered) question (see here) as I try to find an alternative approach.
I added the basic
The is under the covers served by a RequestDispatcher#forward() call. All details of the original request are available as request attribues which are keyed by the keys as identified by RequestDispatcher#FORWARD_XXX constants:
"javax.servlet.forward.context_path""javax.servlet.forward.path_info""javax.servlet.forward.query_string""javax.servlet.forward.request_uri""javax.servlet.forward.servlet_path"You as starter should know that all request attributes are in EL available via the implicit EL object #{requestScope}.
So, all with all, this should do in the view:
Unfortunately, the page you requested, #{requestScope['javax.servlet.forward.request_uri']} does not exist
And equivalently, this should do in the bean, if necessary:
String forwardRequestURI = externalContext.getRequestMap().get(RequestDispatcher.FORWARD_REQUEST_URI);