Hi everyone!
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. What if I throw
this exception in the init method? Does my servlet load into the memory and
can it handle requests?
2. In my servlet I use some helper class, which can throw exceptions.
doPost() throws ServletException {
try {
handleRequest();
}
catch (HandleException he) {
throw new ServletException();
}
}
handleRequest() throws HandleException {
try {
getSomethingFromDB();
}
catch (DBException dbe) {
throw new HandleException();
}
}
getSomethingFromDB throws DBException
Is it a good practice or I have to forget it and do something else (throw
RuntimeException in getSomethingFromDB)?
Thanks in advance.
Gábor
___________________________________________________________________________
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