• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Keeping session variables when calling another application

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Websphere 5.1.1
struts 1.1

I would like to create one application that takes care of the initial logon for a group of seperate applications. The logon app would store the username and password in session and the other apps would check the session for username to allow entry. The user would see a list of applications to connect using the entire url:



This works fine but once entering the new application I've lost my session variables. This seems like it should be pretty easy but I've tried for several days now with no luck. Any suggestions?

Thanks
Rich
 
author
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you want to share multiple sessions accross different web applications (WAR files). Are they in the same EAR? Different EAR?

You must enable shared sessions because by default, the spec forces one session per WAR file in J2EE 1.3.
 
RicH Elsberry
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roland,

Thanks for the reponse. The applications are all contained within one war file. How do I enable shared sessions. Is this done programatically or is there a setting within Websphere app server? Also, if I may tag this on, I would like to combine all of the individual application.properties files that each application calls from the WEB-INF folder. Alot of these properties are redundant. Can this file be designated at the EAR level?

regards,
Rich
 
RicH Elsberry
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...oops I meant to say "One EAR file"
 
Roland Barcia
author
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the EAR deployment descriptor editor, there is a check box for shared session context. This is an IBM extension since the J2EE 1.3 spec does not show how sessions are shared. The file that has this is ibm-applicaiton-ext.xmi
 
RicH Elsberry
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't believe I missed that checkbox. It appears to work fine now. Thanks much for you assistance Roland.

Regards,
Richard
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic