I am working on Spring 3. I am going to integrate Log4j in my Application,
Can I log the HTTP error like 404, 505 etc in my log file, because that errors I am redirecting to error-page from web.xml file using tag.
I am working on Spring 3. I am going to integrate Log4j in my
Share
I don’t think there is an easy way to make a very detailed logging with Spring MVC.
The easiest way is to log it in your error page view file if it is a jsp but you probably cannot do very much detailed logging without pre-handling the exception in Spring controller.
This tutorial is very useful for learning how to properly handle exception from both error-page and from your controller itself. It should give you some idea of what to do.