views:

249

answers:

1

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 work. How can i intercept method calls on JSF-backing code?

A: 

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

Bozho
I already have a `VariableResolver`:http://snipplr.com/view/26748/guice-variable-resolver/This is bound with the following code in faces-config.xml:`<variable-resolver>a.b.c.GuiceVariableResolver</variable-resolver>`
kungfoo
Is something wrong with that?
kungfoo
at least in my config using spring, it is the <el-resolver>, not <variable-resolver>
Bozho
Ill try getting a custom el-resolver in there and report back.
kungfoo
It's an icefaces 1.8 application. The el-resolver is silently ignored...
kungfoo
how do you know it's silently ignored?
Bozho
and it doesn't matter icefaces or not
Bozho
The code inside it is never executed.
kungfoo