Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Changing Session Timeout

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have deployed a web application on websphere and now I want to change the session timeout. I want to maked it about 120 minutes.
I am not sure how I can change it?
I dont know how just changing the war file through AAT and setting timout to 120 minutes will automatically change the deployed application. Do I have to change the war file.. Is there anyway I can change it using the administrative console? I would also have to restart the server if I changed the ear/war files since I am using version 4.
Please advise on the best possible way to do this.
Thanks
Priya
 
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Priya,
You can make this change in the admin console in the web section (or the AAT.) This makes the change to the already deployed war. If you have to redeploy or move the war to a different server, the change will have to be redone manually.
Just for the future, if you know the session timeout value needed when you build the war file, you can stick it in the web.xml file.
 
riya s
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne,
Thank you for your response. I wanted to just set the session time of this particular web application...If I set the session time from the admin console it would affect all applications or can I set it so it just affects this application?
Also I am not sure what you mentioned about the war. I have the war file which I used to install the application .. If I change that ear/war file and change the session timeout in that then will websphere automatically take the change? Does it still refer to the war/ear file we used to install the application after it has been installed? Do i need to uninstall and reinstall the application through admin console with this changed war file?
(I noticed before that when I change the web.xml directly, websphere doesnt accept that.)
Please let me know..
I am curious to know if there is any link between the file I used to install the application and the installation.
 
riya s
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne,
Thank you for your response. I wanted to just set the session time of this particular web application...If I set the session time from the admin console it would affect all applications or can I set it so it just affects this application?
Also I am not sure what you mentioned about the war. I have the war file which I used to install the application .. If I change that ear/war file and change the session timeout in that then will websphere automatically take the change? Does it still refer to the war/ear file we used to install the application after it has been installed? Do i need to uninstall and reinstall the application through admin console with this changed war file?
(I noticed before that when I change the web.xml directly, websphere doesnt accept that.)
Please let me know..
I am curious to know if there is any link between the file I used to install the application and the installation.
 
Jeanne Boyarsky
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Priya,
If you set the session time in the admin console it is just for that one application. It does not carry over to any other applications.
If you change the web.xml directly and restart the app server, the change should take affect.
In my previous post, I was refering to the war/ear file that you provide to websphere to deploy. The change would be for future installations of that war/ear. Sometimes its easy to forget that you made a change in the admin console. Then when you deploy the application elsewhere, you wonder why the settings are different.
The file you used to install is not connected to the installation after the install is complete. I didn't mean to imply that is was.
 
riya s
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne.. Thanks again! I am using version 4 of websphere and under web container it has session settings but it does not say that it would just affect my application.. and it looks like a overall default server setting since it says that if the session-timeout is not specified in the web.xml then the server would take that value.. there seem to be no other links that would change the session timeout for that application..
 
Jeanne Boyarsky
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Priya,
I'm using v4 too. Make sure you are expanding both the node and your application's server (not the server as a whole.) There is a tab for web settings that relate to the application.
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to ensure that the session timeout is your desired value (in your case 120 minutes), just put this into the web.xml of your .WAR:

<session-config>
<session-timeout>120</session-timeout>
</session-config>

-Ed
[ March 04, 2005: Message edited by: Ed Wallen ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic