title: Using pure JSF to obtain calling page
body: <p>JSF 1.2-1.2_07-b03-FCS</p>
  
  <p>JSTL 1_1-mr2 (special build)</p>
  
  <p>Java 1.6.0_22-b04</p>
  
  <p>Eclipse 3.6.0 (Helios)</p>
  
  <p>Tomcat 6.0.28 (needs to run also on Weblogic)</p>
  
  <p>IE 7.0.5730.13</p>
  
  <p>Firefox: 6.0</p>
  
  <p>We have page: 
  http://{host:port}/mybase/faces/mypage.jsp...</p>
  
  <p>It is called from multiple external pages via hyperlink, redirect, etc.</p>
  
  <p>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.</p>
  
  <p>We know we can do this:</p>
  
  <pre><code>    FacesContext facesContext = FacesContext.getCurrentInstance();
      ExternalContext externalContext = facesContext.getExternalContext();        
      HttpServletRequest origRequest = 
          (HttpServletRequest)externalContext.getRequest();
      String referrer = origRequest.getHeader("referer"); 
  </code></pre>
  
  <p>This, however, requires the HttpServletRequest which requires including the servlet-api.jar file.</p>
  
  <p>The question: can this be done in a pure JSF manner and thus, without including the servlet-api.jar file?</p>
  
  <p>Thanks,
  John</p>