Originally posted by Shiaber Shaam:
A doPost can declare exceptions like ServletException and IOException alone. Otherwise, it won't be compiled.
In this case, which exceptions are the sub classes of ServletException??
The only one provided by the spec is UnavailableException.
You can always subclass it with your own exceptions if you like.
Or... as mentioned earlier, you can simple re-throw it as a ServletException.