I am not sure if you can actually control the life cycle of your servlet. I
dont think such a situation has been addressed by the specification. If
these erring statements occur within the init() part of your servlet, you
could throw a ServletException , thus prompting the container to unload your
servlet.
In other cases , when the error causing statements are within your service
methods , you could simply set a class boolean variable to indicate the
same, and code your service methods to check the value of this boolean
before processing the main logic.


----- Original Message -----
From: "Edward" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 13, 2002 1:05 PM
Subject: How to force terminate Servlet?


>   I want to know if a method or function that by using it,I can forcely
terminate Servlet and return to OS.The reason which I want to do it is when
my statements in Servlet executing,it occures errors,I want not to execute
my statements any more and force terminate it.
> Thanks!
> Edward
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to