At some point in this jsf web application, the current user is prompted to identify with Twitter via OAuth.
After the user identified on Twitter the OAUth callback url redirects to my app:
http://www.myJsfApp.com/successAuth.xhtml
But of course without a session id this successAuth.xhtml is not connected to the user session. The page is just the “raw” xhtml file (with all its tags) and no html.
How can I make this callback url to link back to the current session?
If your servletcontainer supports URL rewriting (by default, they all do), then you can just pass the session ID as URL path fragment.
See also:
That will happen when the
FacesServletisn’t been invoked. The request URL must match the URL pattern of theFacesServletin order to invoke it. So, if you have configured it to listen on for example/faces/*URLs, then you should obviously change the URL tofaces/successAuth.xhtml.Alternatively, you can also just map the
FacesServleton*.xhtml, this way you never need to fiddle with virtual URLs.See also: