Web application and error Logging
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Colin_Jackman
Posted On:   Wednesday, December 11, 2002 07:25 AM

I have JSP pages that call a number of javabeans that contain all my database access code. I want to trap and log errors from the beans. I would like to use the log method that is available from the JSP pages (or servlets). This way all my error messages are in one locations.


I don't pass any of the objects that would be needed to accomplish this easily (ServletContext, application, request, response, etc.)


Is there any way to get the GenericServlet object reference from within a bean so the log function can be used?


Thanks


Colin Jackman

Re: Web application and error Logging

Posted By:   Anonymous  
Posted On:   Thursday, December 12, 2002 07:36 AM

The only idea I have is to pass the category name to the bean by their constructor. So they can instantiate "their own" logger with that name which results in the same appender constellation.
About | Sitemap | Contact