开发者

JSF, Exception Logging using a aopalliance MethodInterceptor

开发者 https://www.devze.com 2022-12-18 01:17 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号