Question: what are you allowed to declare as an exception type in <exception-type>??Answer:
Anything that's throwable so that includes java.lang.Error,runtime exceptions, and any checked exception(as long as the checked exception class is on the Container's classpath,of course)
The <exception-type> requires the full class name of the Throwable type, which we want to catch by this mechanism. As the type is "Throwable" we can catch Errors, Run-time Exceptions and Checked Exception. Checked Exceptions are ususlly declare in the method defination throws clause, if you want to propogate the exceptions to the outer world (i.e to Exception handling mechanism).
any checked exception(as long as the checked exception class is on the Container's classpath
If it is required to define custom exceptions for exception handling the user usullay define the checked exceptions. So these checked exception clsses must be accessible to container , so it should be in the container's classpath. If the containe can not find Exception class it will be error.