permaculture playing cards*
The moose likes Applets and the fly likes How to include Session Time out Tag? 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 » Applets
Bookmark "How to include Session Time out Tag?" Watch "How to include Session Time out Tag?" New topic
Author

How to include Session Time out Tag?

Sirish Kumar Gongal Reddy
Ranch Hand

Joined: Oct 25, 2004
Posts: 109
Hi,

Can any body please tell me how to include session time out tag in applet ? I need to invalidte user session after 30 min.
So before expiring his session I need to save user work (on Applet)and I need to give warning to user on Applet?

Any ideas?

Many thanks,
Sirish
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41178
    
  45
Applets don't have a concept of sessions (what tag is this you're mentioning?).

Can you tell us in more detail what you're trying to do?


Ping & DNS - my free Android networking tools app
Sirish Kumar Gongal Reddy
Ranch Hand

Joined: Oct 25, 2004
Posts: 109
Hi Ulf,

Thanks for your response!

I have an web application there I set idle time for each user in the database. once user is sitting idle for specified time then his session will be invalidated.

On other hand my webapplication has Applets too, once applet is downloaded to local browser I am not able to handle/track user session.

1) I don't know how much time user is intaracting with the Applet. as long as he is intaracting with Applet his session has to extend if he sits idle then his session has to invalidate. servlet is handling user session activities.

2) how I can communicate with servlet from an Applet? If I am not intaract with the servlet say for 5 min my servlet will finish it's job, it will invalidate user session even though user is seriously working on an Applet.(say just user is editing the date on the Applet).

Hope my explanation is clear! Thanks!

-Sirish
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41178
    
  45
Applets can talk to servlets via HTTP. The technique is decribed here.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to include Session Time out Tag?
 
Similar Threads
Executing a jquery function on a condition
Session
User logged in time - session listener?
Obtaining HTTPSession Object in Applet to Servlet Comm - JSDK 2.1
Deploying applets with tomcat