Which of the given LOCs can be inserted at //1 to log the message as well as the exception's stack trace?
1. req.log(e, "Unknown User");
2.req.log(e, "Unknown User");
4.this.getServletContext().log(e, "Unknown User");
5.The stack trace of the exception cannot be logged using log(...) methods.
Correct answer is 3.
But I say it should also be 4.
As, in ServletContext we have message log(Exception e,String message)