nerdexam
Oracle

1Z0-899 · Question #159

You are working on a JSP that is intended to inform users about critical errors in the system. The JSP code is attempting to access the exception that represents the cause of the problem, but your…

The correct answer is A. Add a page directive stating that this page is an error handler. See the full explanation below for the reasoning.

Question

You are working on a JSP that is intended to inform users about critical errors in the system. The JSP code is attempting to access the exception that represents the cause of the problem, but your IDE is telling you that the variable does not exist. What should you do to address this problem?

Options

  • AAdd a page directive stating that this page is an error handler
  • BAdd scriptlet code to create a variable that refer to the exception
  • CAdd a <jsp:useBean tag to declare the and access the exception>
  • DPerform the error handling in a servlet rather than in the JSP
  • EEdit the page that caused the error to ensure that it specifies this page as its error handler

How the community answered

(58 responses)
  • A
    83% (48)
  • B
    2% (1)
  • C
    10% (6)
  • D
    3% (2)
  • E
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice