File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Init & Destroy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Init & Destroy" Watch "Init & Destroy" New topic
Author

Init & Destroy

hammer jan
Greenhorn

Joined: Oct 04, 2002
Posts: 5
Hello everyone:
when i create a connection in
public void jspInit(){//create conn there.}
and want to close the connection when i close the jsp window, i write it in Destroy:
public void jspDestroy()
{ try{if(conn!=null) conn.close();conn=null;
catch(Exception){}
}
but when i close the window
i found the connection is still alive!

please help how can i close the connection
when i close the jsp explorer window
thanks for any reply
hammer


SCJP
Alex Sack
Greenhorn

Joined: Jul 14, 2003
Posts: 5
rethink what your are asking ...
Hint: a jsp-page has nothing to do with the browser window & vv.
asac
hammer jan
Greenhorn

Joined: Oct 04, 2002
Posts: 5
ok i change my question :
When the container(VM) will call the jspDestroy method ?
thanks for any reply
hammer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Init & Destroy