Client/Server Communication - JSP Execution
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Paliatsos
Posted On:   Friday, April 20, 2001 12:15 PM

I have a jsp page that opens a database connection as part of its logic. The last part of the page destoys the connection. I've noticed that hitting stop on the client causes the jsp page to stop loading and a connection is left open on the server. What actually happens when a user hits stop on the browser while a jsp page is loading? Does the jsp page (servlet) finish processing the _jspservice method? Does the compiled jsp servlet still destroy itself? Is the memory used from the page released? Will the page halt like it does when a jsp:forward tag is encountered?

Re: Client/Server Communication - JSP Execution

Posted By:   AlessandroA_Garbagnati  
Posted On:   Friday, April 20, 2001 01:05 PM

When the client hits stop on the browser, the http connection is broken and you probably have an IOException on the servlet side. Eventually you can put the code for closing the database connection in the exception handler, or, better, in the finally of the try/catch.
About | Sitemap | Contact