Java Servlets
IOException
, ServletException
or
RuntimeException
(because of service()'s
signature). ServletException
constructor takes a root
cause as argument:
javax.servlet.ServletException(Throwable rootCause); javax.servlet.ServletException(String msg, Throwable rootCause);
public Throwable ServletException.getRootCause();
UnavailableException
is the only one that
subclasses ServletException
. Used to indicate
servlet is unavailable:
javax.servlet.UnavailableException(String msg); //permanently unavailable javax.servlet.UnavailableException(String msg, int seconds); //be back in seconds
41 of 89