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 141955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:51:35+00:00 2026-05-11T07:51:35+00:00

I have a JSF application that makes much use of session-scoped variables. A new

  • 0

I have a JSF application that makes much use of session-scoped variables. A new requirement is that the user should be able to open N numbers of the application. However, since much of the state is session-scoped, when the client opens a 2nd instance of the app, view data from the first app bleeds into the newly opened app.

At this point, changing all the session-scoped beans to request-scoped beans would be very difficult. Is there a way to solve this problem at a higher level, by perhaps mapping external (client) sessions with one or more internal (artificially created and used by JSF) session objects?

  • 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. 2026-05-11T07:51:35+00:00Added an answer on May 11, 2026 at 7:51 am

    You can control how the session is provided to the JSF application via the FacesContextFactory (which provides the FacesContext which contains the ExternalContext). This needs to be configured in a faces-config.xml so JSF can pick it up during initialization. If you use a constructor of the form MyFacesConfigFactory(FacesConfigFactory) JSF will pass the previously configured factory, allowing you to decorate the underlying implementation.

    Some issues you may encounter:

    • You would need control over what it means to ‘open the application’ in order to create a sub-session. For example, a form that creates the sub-session.
    • You need some mechanism to match requests with your session – probably through the ExternalContext URL encoding methods (which will need to be used religiously; well behaved components already use these).
    • You need a whole layer of session management code – I’m thinking about folks creating huge HTTP sessions just by opening multiple ‘instances’ of the app.
    • There are probably plenty of edge conditions and other things I didn’t think of.

    This is an interesting approach to the problem, but I wouldn’t expect it to be a quick fix.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSF 1.2 application that has a session going on and whenever
I am new to JSF and have a problem with my simple JSF application.
I have a JSF 2.0 application running on GlassFish v3. It has EJBs that
Let's say that I have an application which manages users. You can add new
I have a complex application that contains a mix of JSF and Apache MyFaces.
All the tutorials I have seen seem to use *.jsf , *.faces , or
I am creating a JSF application. I have some items (e.g. products) from database
I have written an application that connects to a SSL web service (including client
I have a Java EE 6 application with JSF 2 and Tomcat 7. Now
I have a new web app that is packaged as a WAR as part

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.