Page 1 of 1

About Question enthuware.jwpv6.2.686 :

Posted: Sun Oct 27, 2013 11:29 am
by Jkike79
Hi,

I have some doubts about the anwser of this question, beacuse I know that ServletContext(String, Throwable) is the best option but it is NOT the only one.

The ServletContext API (Jave EE 6) also indicates a Deprecated method:

Code: Select all

void log(Exeption exception,
         java.lang.String msg)

    Deprecated. As of Java Servlet API 2.1, use log(String message, Throwable throwable) instead.

    This method was originally defined to write an exception's stack trace and an explanatory error message to the servlet log file. 
So since the try-catch is on "Exception e" I can actually use the deprecated method although I convey it is not the BEST option.

Re: About Question enthuware.jwpv6.2.686 :

Posted: Wed Oct 30, 2013 6:27 pm
by admin
You are right. This has now been added to the explanation for that option.

thank you for your feedback!
Paul.