wood burning stoves 2.0*
The moose likes Servlets and the fly likes What is  difference between timeouts in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "What is  difference between timeouts in jsp" Watch "What is  difference between timeouts in jsp" New topic
Author

What is difference between timeouts in jsp

sridhar rao
Greenhorn

Joined: Sep 25, 2005
Posts: 7
1.session.setMaxIntervalTimeout

2.session.setMaxInactiveIntervalTimeout

[ September 27, 2005: Message edited by: sridhar rao ]
[ September 27, 2005: Message edited by: sridhar rao ]
Lalitha Gottumukkula
Ranch Hand

Joined: May 24, 2005
Posts: 45
It could be mentioned in the web.xml file.

Thanks,
Lalitha.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Lalitha Gottumukkala:
It could be mentioned in the web.xml file.


Quite right. More specifically ...



Alternatively, you can set it using session.setMaxInactiveInterval(int interval).
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Setting timeout differs:
web.xml - minutes
setMaxInactiveInterval - seconds


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by David Ulicny:
Setting timeout differs:
web.xml - minutes
setMaxInactiveInterval - seconds


A nice pick. I should have told this.
Cent percent agreement.
sridhar rao
Greenhorn

Joined: Sep 25, 2005
Posts: 7
Originally posted by Adeel Ansari:
[QB]

but we r not using wex.xml..because we have 2 applications..so i want full jsp..for my applications
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by sridhar rao:
but we r not using wex.xml..because we have 2 applications..so i want full jsp..for my applications


Couldn't get you.
How are you mapping your servlets? How are you configuring you application?
sridhar rao
Greenhorn

Joined: Sep 25, 2005
Posts: 7
Originally posted by Adeel Ansari:


Couldn't get you.
How are you mapping your servlets? How are you configuring you application?


here we r using the vignette..
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by sridhar rao:
here we r using the vignette..


Not familiar with vignette, though.
But you can still use session.setMaxInactiveInterval(int interval)

where,
interval is value in seconds.
sridhar rao
Greenhorn

Joined: Sep 25, 2005
Posts: 7
Originally posted by sridhar rao:
[QB]

Yes its better to use
if i have 2 jsps

form.jsp
processForm.jsp

In form.jsp do

session.setAttribute("previousTimeout",new Integer(getMaxTimeIntervel() );
setMaxTimeIntervel(60*60) ;



In processform.jsp

set setMaxTimeIntervel(session.setAttribute("previousTimeout") )

right...
Lalitha Gottumukkula
Ranch Hand

Joined: May 24, 2005
Posts: 45
Absolutely !!
sridhar rao
Greenhorn

Joined: Sep 25, 2005
Posts: 7
Originally posted by sridhar rao:
hi.friends..i need to increase the session timeout for our application..it need to effect the whole theapplication...can u please send me the detail

[ September 26, 2005: Message edited by: sridhar rao ]

Further Clarification: I don't want to use web.xml or the tomcat admin for setting the session timeout as my application will be deployed on the US server or else by other team. So i have to set it in either JSP or servlets. Also what i need it that when a user stop using the application for 1 hour and then after 1 hour if he click any link then he should be redirected to login screen. And he needs to re - login.

I hope i am clearer now on my requirement. Can someone help me on this. Thanks.

[ September 26, 2005: Message edited by: sridhar rao ]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
When you want to post a reply. All you need to do is click the icon/button/image, post reply, at the end of the page.

When you want to quote some previous post then you just need to click the Double Quotes icon/button/image, present in the header of every post. Just press that icon of that particular post.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is difference between timeouts in jsp
 
Similar Threads
problem with the name attribute of form tag
ask for a english abbreviation
Job in India (Bangalore)
Here
Should we expect such questions?