nerdexam
Oracle

1Z0-899 · Question #193

Given the fragment from Java EE deployment descriptor: 341. <error-page> 342. <exception-type>java.lang.Throwable</exception-type> 343. <location>/mainError.jsp</location> 344. </error-page> 345…

The correct answer is C. The container invokes castError.jsp. See the full explanation below for the reasoning.

Question

Given the fragment from Java EE deployment descriptor: 341. <error-page> 342. <exception-type>java.lang.Throwable</exception-type> 343. <location>/mainError.jsp</location> 344. </error-page> 345. <error-page> 346. <exception-type>java.lang.ClassCastException</exception-type> 347. <location>/castError.jsp</location> 348. </error-page> If the web application associated with the fragment above throws a ClassCastException. Which statement is true?

Options

  • AThe deployment descriptor is invalid.
  • BThe container invokes mainError.jsp
  • CThe container invokes castError.jsp
  • DNeither mainError.jsp nor castError.jsp is invoked.

How the community answered

(44 responses)
  • A
    14% (6)
  • B
    7% (3)
  • C
    77% (34)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice