About Question enthuware.jwpv6.2.686 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
Jkike79
Posts: 11
Joined: Tue Sep 10, 2013 3:20 pm
Contact:

About Question enthuware.jwpv6.2.686 :

Post 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.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.686 :

Post by admin »

You are right. This has now been added to the explanation for that option.

thank you for your feedback!
Paul.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest