title: Get the complete url in managed bean JSF Spring
body: <p>Hi I am doing facebook login feature in my application. Now problem is that, when I logged in from facebook account, I am redirected to my specified redirected url with access token. I need to grab this access token in managed bean. My redirected url is like that :
  localhost:8080/XXXXXX/myholiday.xhtml#access_token=AAAGHUgDJZCg0BAG2I8o</p>
  
  <p>I have tried:</p>
  
  <pre><code>          HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
  
  
      String url = request.getRequestURL().toString();
  
      System.out.println(url);
  
  
      System.out.println( FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("access_token"));
  
  
      // Getting request information without the hostname.
  
      String uri = request.getRequestURI();
      System.out.println(uri);
  </code></pre>
  
  <p>Output is the following :
  localhost:8080/xxxxxxx/myholiday.xhtml</p>
  
  <p>null</p>
  
  <p>xxxxxxx/myholiday.xhtml</p>
  
  <p>can anyone please help me to grab the access token?</p>