Hi,
I have a
servlet which calls a huge file generation program. The program takes around 2:30 hrs to complete.
I have increased the session timeout limit under web.xml file to 600 that is 10 hours.
Following is the code modified:
<session-config>
<session-timeout>600</session-timeout>
</session-config>
Now, the servlet getting called from the webpage expires in exact 1hour though the process of file generation successfully completes in its stipulated time of 2:30 hrs.
I need a reference id that is returned by the long running process on the user page but since it gets expired, this is not working. Note that the entire website session does not timeout, only that particular webpage expires.
Please suggest how to change this page time of 1 hour. I also heard this can be handled using dummy ajax pings from the webpage, so it returns a value to keep the session alive. I called the ajax pinging process along with the button which called long running process, but it did not help. Even after that the page expired. I think this page expiry is not related to session timeout.
The third approach could be to call an independent
thread from servlet which in turn calls the long running program. But i need to use ajax approach or some other kind of approach to somehow display the id on screen when the process is finished. But donot know how to do it. Need a sample code.
I currently donot have any option to switch this entire thing as an independent background process or to decrease the processing time.
Please help.
--
Regards,
Marie Augustus.