Home » Oracle » 1z0-900 » Which code snippet prints the exception error message as part of the page output?
Which code snippet prints the exception error message as part of the page output?
A. <%= exception.message %>
B. <c:out value="${requestScope[‘javax.servlet.error.exception’]}"/>
C. <% exception.getMessage(); %>
D. <% System.out.println(e.getMessage()) %>
Correct Answer: D
Explanation/Reference:
Reference: https://www.geeksforgeeks.org/3-different-ways-print-exception-messages-java/
Download Printable PDF. VALID exam to help you PASS.
|
|
Answer is B
C