List the correct entries in the web.xml deployment descriptor for Exception & Error Handling
-
<error-page> <exception-type>java.lang.Throwable</exception-type> <location>/error.jsp</location> </error-page>
-
<error-page> <error-code>500</error-code> <location>/error.jsp</location> </error-page>
-
<error-page> <location>/error.jsp</location> </error-page>
-
a & b
web.xml error-page configuration can handle both exceptions (via exception-type) and HTTP error codes (via error-code). Option A shows exception-type configuration for Throwable. Option B shows error-code configuration for 500 errors. Option C is missing required elements. Both A and B are correct entries.
The web.xml deployment descriptor supports declaring entries keyed either by a specific HTTP (like 500) or by a Java (like `java.lang.Throwable` to catch any uncaught exception), both mapped to a such as an error JSP. Since both forms (a and b) are valid, correctly-formed error-page declarations, the combined option is the right choice; an `` with neither an error-code nor exception-type (option c) is not valid.