aspose file tools*
The moose likes Servlets and the fly likes Keep http request or session alive in servlet application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Keep http request or session alive in servlet application" Watch "Keep http request or session alive in servlet application" New topic
Author

Keep http request or session alive in servlet application

durgaprasad ganji
Greenhorn

Joined: Mar 01, 2007
Posts: 7
Dear Friends,

I am working one Servlet and Velocity(UI) based application. we have set the session max interval time as 15 minutes in my application that means if we keep our application keep idle for more than 15 min, we will get session time out or expired message in between.Here we cannot increase session max interval time not more than 15 min due to some restrictions from server(websphere) administration team.

in one scenario of our application, one request taking more than 20 min(due to some SQL query taking 20 min in returning huge result data).thus we are in panic situation in waiting for response up to 20 min and in between we are getting session time-out message. Here we cannot fine tune sql query to reduce the sql response.

In this case, i want http request to be keep running until response finishes and display data in browser or i want keep http session alive in server side during this request/response hence page cannot be expired while before response comes and display result data in browser

Please let us know how can i implement or keep http session alive or how can avoid the session keeping idle during this particular request/response.

It would be appreciated if anybody help me in this scenario..

Thanks in Advance,
Prasad
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61187
    
  66

You shouldn't have such a long response time holding up the browser. Rather, return to the browser right away after firing off a thread that performs the long operation in the background. Have a way for the user to check on the progress of the operation and see the results once it completes.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
durgaprasad ganji
Greenhorn

Joined: Mar 01, 2007
Posts: 7
I am not holding up the browser, rather server response taking more than 20 min, hence getting timed out error message.how can I return to browser immediately after firing off thread/Business Logic which performs log operation and how can i check progress of the operation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Keep http request or session alive in servlet application