I want to log all user JSF requests (including AJAX), to do this I have implemented an @Observer for the @RequestScoped
This works however it also fires for all static content GET requests including CSS/JS/Images etc. which I do not want to log.
Is there a convenient way to determine if the request was initiated from the user and ignore static file GET's? I thought of checking the requested files extension but some of the static files seem to end with .xhtml so that won't work
I am using Omnifaces if that helps (JSF 2.3 / CDI)
public void logRequest(@Observes @Initialized(RequestScoped.class) ServletRequest payload) {
// logging request here
}