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

  • SEARCH
  • Home
  • 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 8531361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:27:58+00:00 2026-06-11T09:27:58+00:00

I have a variable that users can modify in a JSP/Struts application that must

  • 0

I have a “variable” that users can modify in a JSP/Struts application that must be persisted across that entire web application’s session. They may navigate away from the page where it is set and viewed (still staying in the application), and when they come come back the value they last set for that variable should still be present.

The obvious choice would be to store it as a session attribute. And that’s what I would have done a few years ago. But Internet Explorer 8 and higher cause a web app user to have one session for all browsers that are open to the same site. In other words, if a user opens my application in a browser, then opens it a second time in another browser, they share a single session. I presume they are sharing the cookies that represent that session. The result is if they change the value in one browser’s session, that value will then be changed in the other browser as well.

My users will run the web app multiple times on a single workstation, and I need for them to be able to set different values for the above mentioned variable in their different browser windows (or even tabs), and have the different values persist for that browser (or tab) lifetime, but not affect any other open browsers (or tabs) to the same application.

So, as far as I can tell using session attributes is out of the question. (Well there is the IE -nomerge option, but there is no way to force the users to launch IE using that option).

I am hoping I am not the first to deal with this issue, and someone out there has solved it elegantly, and that person reads this post and responds.

  • 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-11T09:27:59+00:00Added an answer on June 11, 2026 at 9:27 am

    There is no way for the server to distinguish different tabs or windows if they all send back the same session id. However, if you need that kind of functionality then I would consider building the “difference” into the URL’s. For example, one tab might have /myapp/xxxxx/, while a different tab might have /myapp/yyyyy/. The might both share the same session but the server can still distinguish between them. The actual format of the URL is not really important so long as the browser always returns the magic part (eg: xxxxx) somewhere. At the server end of things you can keep track of multiple numbers per session based on the sessionid and the URL that is making the request.

    The only thing to decide is how you notice that a new tab or window has opened, as you have to assign a new URL, but that’s just plumbing. For example, you could have a local js variable which needs to be set to match the URL, then when a new tab opens this variable will not match so you can then go to a new appropriate URL and set the local variable.

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

Sidebar

Related Questions

I have a variable that can either contain a list of strings or a
I am building a multi-user web application. Each user can have their own site
So I have this calculator I'm building that accepts user variable inputs like let
I'm studying javascript these days and I have question. I have variable that contain
I have a variable that may contain objects or may be undefined. I wish
I have a variable that contains the following JSON string: { 0 : Jun
I have a variable that im define with another variable and some text. $title
I have a variable that contains : Sometimes array of strings and sometimes array
I have a report in our internal system that can return anywhere from 1
I have a java application that streams raw data and draws real time plots

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.