This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes Logging errors from jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Logging errors from jsp" Watch "Logging errors from jsp" New topic
Author

Logging errors from jsp

Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Hi All,
As a part of implementing logging in my web application using LogBack , I'm trying to apply logging wherever relevant . I 've handled all the error logging coming through the java classes using the default options available . However , how do I get the errors generated from the jsp to be logged.??
Even if use the <c:catch> mechanism , how do I get this error to be logged to a log file?
Thank you for your time.


Learning and Learning!-- Java all the way!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

You shouldn't be catching errors in the JSP, or anywhere else for that matter.

Rather, configure an error handling servlet (servlet, not JSP, servlet) in the deployment descriptor and handle errors centrally.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logging errors from jsp