Kevin Mukhar wrote:
>
> Suhai G�bor wrote:
> >
> > 1. Am I thinking right that when I throw a ServletException
> > in the doPost or doGet method, it only affects the current
> > request, and not all? I mean, other requests can come in and
> > can be handled independently.
>
> Yes. An exception only affects the current thread; other request
> threads are unaffected.
>

 But also: If you throw an UnavailableException during
request processing, the servlet _is_ taken out of
service. (2.3PFD 2.3.3.2)


> The servlet container does not send a response back
> when it catches an exception.
>

 The spec seems to indicate that the container _should_
send a response back. Tomcat (3.?) sends back a 500
"Internal Server Error" and gives a stack trace, which
seems pretty reasonable, but 2.3PFD 9.8 describes
setting up error pages.


> You can still throw the exception up to the servlet
> container if you want, but you should also send a
> response back to the client which says that the request
> could not be processed.

 So, if the container is supposed to send back an error
response (9.8) when it gets an exception, what is supposed to
happen if content has already been sent when the exception
happens? What exactly does "take appropriate measures"
mean in that case?


-cks

___________________________________________________________________________
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