JSF, Exception Logging using a aopalliance MethodInterceptor
I would like to log the exceptions that are thrown when serving JSF files in the same way other exceptions are logged in our web application.
We annotate classes with logged exceptions with @LoggedExceptions
and a MehtodInterceptor
is matched against those classes with Guice AOP (This should be very similar for other implementations of aopalliance...)
The main problem is, that the method interceptor does not w开发者_运维知识库ork. How can i intercept method calls on JSF-backing code?
You must replace the default el-resolver (<el-resolver>
in faces-context.xml
) with a Guice el-resolver, so that the jsf beans become instantiated by Guide.
Search for "Guice el resolver", or take this one (I can't guarantee it works). Also check this thread.
Also, read the top results of this google search
精彩评论