Meaningless Drivel is fun!
The moose likes JSP and the fly likes Make JSP Page alive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Make JSP Page alive" Watch "Make JSP Page alive" New topic

Make JSP Page alive

damayanti sankhua

Joined: May 21, 2008
Posts: 10
one operation(activity)is taking around 1.30 hour to complete. But in between the operation Jsp page gets die . Anybody can tell how to make Page Alive as long as session is there.
Karthikeyan Ramaswamy
Ranch Hand

Joined: Apr 30, 2008
Posts: 42

you can increase session time-out in 2 way,

1.Use setMaxInactiveInterval(int interval) method of the HttpSession.

2.Use web.xml, <session-timeout>20</session-timeout> Tag

setMaxInactiveInterval() takes in seconds.

web.xml effects whole web application (takes in mintutes).
damayanti sankhua

Joined: May 21, 2008
Posts: 10
You are telling to keep session alive by previous reply. But In my application Session is alive upto operation completion but page gets die. How do I solve this problem.
Shilpa Tendulkar
Ranch Hand

Joined: Jul 29, 2001
Posts: 75
If I have understood your problem well, your session gets timedout because of no activity going on for long time(taking 1.30hr for your task to finish).
Solution for this could be, keep sending a request to server after X intervals continuosly till user logout or till your operation is over.
You can do this by, sending a request to an image or frame on server.

Something similar I have done using this script:

Hope this helps. Good luck!

I agree. Here's the link:
subject: Make JSP Page alive
It's not a secret anymore!