users@jersey.java.net

Using ServletFilter with Grizzly

From: Markus Karg <markus.karg_at_gmx.net>
Date: Sun, 13 Dec 2009 20:00:40 +0100

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