JSF 1.2-1.2_07-b03-FCS
JSTL 1_1-mr2 (special build)
Java 1.6.0_22-b04
Eclipse 3.6.0 (Helios)
Tomcat 6.0.28 (needs to run also on Weblogic)
IE 7.0.5730.13
Firefox: 6.0
We have page: http://{host:port}/mybase/faces/mypage.jsp...
It is called from multiple external pages via hyperlink, redirect, etc.
We would like to determine the URL of the page that called it (in order to implement a command button "back" button) in a pure "JSF" manner.
We know we can do this:
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
HttpServletRequest origRequest =
(HttpServletRequest)externalContext.getRequest();
String referrer = origRequest.getHeader("referer");
This, however, requires the HttpServletRequest which requires including the servlet-api.jar file.
The question: can this be done in a pure JSF manner and thus, without including the servlet-api.jar file?
Thanks, John