geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Inserting a filter into the web container
Date Thu, 29 Nov 2007 17:20:57 GMT
I guess you could write a ModuleBuilderExtension that modified  
web.xml to add the filter and appropriate filter mapping.  I think  
you'd need to do the work in the initContext method.  I'm not sure if  
I'd call this method "good" or not but its all I can think of right now.

In the createModule method you can add the jar containing your filter  
to the dependencies so the web app can actually find the filter...

hope this helps
david jencks

On Nov 29, 2007, at 9:05 AM, Aaron Mulder wrote:

> Is there some good way to insert a filter/interceptor into the web
> container request processing chain that would work for both Tomcat and
> Jetty?  For example, let's say you wanted to apply some particular
> request validation/auditing functionality to every application,
> without changing the application configuration (e.g. without updating
> web.xml).  It would be easy to write a little request filter or
> interceptor to do it -- I'm just not sure what the best way is to hook
> that in so it gets executed, and whether we have common
> filters/interceptors for Tomcat and Jetty or whether you'd have to do
> something different for each.
>
> Thanks,
>        Aaron


Mime
View raw message