The only way I've found is to directly setup a ServletAdapter [1], which is
one of the implementations that GrizzlyWebContainer can use behind the
scenes to set up your test server.
[1]
https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/http/servlet/ServletAdapter.html#addFilter(javax.servlet.Filter,
java.lang.String, java.util.Map)
--
Steven
On Sun, Dec 13, 2009 at 7:00 PM, Markus Karg <markus.karg_at_gmx.net> wrote:
> Dear Jersey Community,
>
>
>
> to test drive a small JAX-RS sample I wrote, I am using Grizzly. Now I need
> to add a ServletFilter that shall filter all requests going through Grizzly
> to the JAX-RS application. I wonder how this can be set up. Any ideas? The
> current code I am using is this one:
>
>
>
> *public* *class* Main {
>
> * public* *static* *void* main(String[] args) *throws* IOException {
>
> Adapter adapter = RuntimeDelegate.*getInstance*().createEndpoint(*new*MyApplication(), Adapter.
> *class*);
>
> GrizzlyServerFactory.*create*("http://localhost:80/", adapter);
>
> }
>
> }
>
>
>
> Thanks a lot!
>
> Markus
>