I want to figure out how I can set a session timeout in struts without using web.xml file. Is there any way where I can put a declarative global entry for session timeout in the struts config. Please suggest.
Thanks and Regards,
Suhas
http://www.xplore-java.blogspot.com/
Nishan is correct--there's nothing for session handling in Struts. Sessions are handled by the container, not frameworks running in the container.
Suhas Bilaye
Ranch Hand
Joined: Sep 10, 2009
Posts: 80
posted
0
Thanks for the reply
Could you tell me if I have a session scope for one of the action mappings element in the struts config.
Then what will happen if session timeout occurs (web.xml) during the execution of that action?
When you are declaring Session time out Container consider your session idea time for time out your session.
For example if you set your Session time out 15 Min. And you session use in your action then it will not time out by container. But it last 15 Min your session not use your application then and then your that session time out.
If you are using Session at your action then this session not time out by container. It considers only Session idea time for time out.