Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9013227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:12:29+00:00 2026-06-16T03:12:29+00:00

At some point in this jsf web application, the current user is prompted to

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:12:31+00:00Added an answer on June 16, 2026 at 3:12 am

    But of course without a session id this successAuth.xhtml is not connected to the user session.

    If your servletcontainer supports URL rewriting (by default, they all do), then you can just pass the session ID as URL path fragment.

    HttpSession session = (HttpSession) externalContext.getSession();
    String callbackURL = "http://www.myJsfApp.com/successAuth.xhtml;jsessionid=" + session.getId();
    // ...
    

    See also:

    • socialauth – can you use same session across a redirect?

    The page is just the “raw” xhtml file (with all its tags) and no html.

    That will happen when the FacesServlet isn’t been invoked. The request URL must match the URL pattern of the FacesServlet in order to invoke it. So, if you have configured it to listen on for example /faces/* URLs, then you should obviously change the URL to faces/successAuth.xhtml.

    HttpSession session = (HttpSession) externalContext.getSession();
    String callbackURL = "http://www.myJsfApp.com/faces/successAuth.xhtml;jsessionid=" + session.getId();
    // ...
    

    Alternatively, you can also just map the FacesServlet on *.xhtml, this way you never need to fiddle with virtual URLs.

    See also:

    • JSF Facelets: Sometimes I see the URL is .jsf and sometimes .xhtml. Why?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSF Web application, and at some point i present the client
I had this working at some point, as I had a question about this
This is a short question. At some point my thread understand that it should
In my DefaultRegistry I have this configuration: ForRequestedType<INHUnitOfWork>().CacheBy(InstanceScope.HttpContext) .TheDefault.Is.OfConcreteType<NHibernateUnitOfWork>(); At some point in the
If some one can point me in the right direction for this code for
This is what I have in mind: Can anyone point out some relevant resources?
This seems to have happened at some point this afternoon. First of all, my
I have a mainwindow, and another window called Loginwindow. In some point this LoginWindow
I have a Java web application which stores some data in the session. The
Currently, i am dealing with rich:tabPanel in my web application based on JSF 2.0.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.