aspose file tools*
The moose likes Servlets and the fly likes Session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session" Watch "Session" New topic
Author

Session

S Raman
Greenhorn

Joined: Mar 29, 2006
Posts: 16
Hi,

1)Is there any way to know how many session objects are there on the server side

2) how to make a session ivalid after 30 minutes of inactivity in tomcat

3) how do i call my database to update the user has been invalidated by inactivity (2)
I have a list of user logged in the system the user end is applet.
If the user is inactive for 30 mts the session should expire
If the session expires i need a entry in database for the same


thanks
asdf lkjh
Greenhorn

Joined: Oct 17, 2008
Posts: 12
I think you can specify the session timeout in web.xml as:

<web-app>
<session-config>
<session-timeout>60</session-timeout>
</session-config>

...
</web-app>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

"sush pop", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Be aware that accounts with invalid display names are disabled.

bear
JavaRanch Sheriff
[ October 17, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by S Raman:
Hi,

1)Is there any way to know how many session objects are there on the server side

2) how to make a session ivalid after 30 minutes of inactivity in tomcat

3) how do i call my database to update the user has been invalidated by inactivity (2)
I have a list of user logged in the system the user end is applet.
If the user is inactive for 30 mts the session should expire
If the session expires i need a entry in database for the same


thanks


1. HttpSessionListener help you

2. define in DD as pop explained you above

3. do logic about Database in destroyedSession() in HttpSessionListener

for detail google HttpSessionListener

Hope This Helps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session