Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Prevent timeout on parent jsp where applet resides

 
Amit Hetawal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ALL,
I am having my applet residing inside a jsp, with some buttons present on the jsp which open some different jsp from my ear deployed. Now i get into this weired problem of session timeout of my parent jsp where my applet is residing.
So my problem is even when i start working on my applet, opening new panel from the applet, the main jsp page remains idle. And after a while when i try to click the buttons present on the jsp, it asks me to login again to the server, to access those pages. But my applet still works fine and i can continue working on it.
Is there a way i can avoid this timeout of my jsp, for unlimited time, so i can still access the jsp from the button clicks.

Any suggestions, how can i avoid this.


Thanks
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way to prolong the time until the session times out is probably with the <session-timeout> tag in the web.xml file.
 
Amit Hetawal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
how do i use the <session-timeout>. Am not sure if it will override my company secure login page settings with it, so that i can never timeout, even though the login policy should time me out. Can you please provide some more insight on this.

Please advise,
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This example web.xml contains a session timeout element. There's no way to change the timeout for just a single JSP - it's all or nothing.

An alternative would be to change the timeout of individual HTTPSession objects; maybe for those users that need to use the applet.

One could also turn around the question and ask: If the JSPs time out, why doesn't the applet?
 
Abdul Rahman
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i've a problem something similar. i've a page that contains two jsps embedded in it. one jsp contains applet and the other jsp is the normal jsp.

the session timeout has been set to 15 mins. my problem starts here.

if i do nothing on the page, it logs me out. Perfect.
if i do some operations (there are some operations that can be done on the applet) on the applet part for more than 15 mins, it logs me out. Here lies the problem.

is there any way of capturing the user activity from the applet and convey the same to the container that the user is still using and accessing the page so that the user is not logged out ?

how can i implement session continuity from the applet ? Please help...

Please also note that we cannot increase the session timeout period because of security concerns.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way would probably be to include an invisible IFRAME along with the applet, which then refreshes itself periodically (say, every few minutes). That way the server would be accessed, and the session wouldn't time out for this page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic