users@grizzly.java.net

AJP support without a webapp container?

From: Gonk <gonkinator_at_gmail.com>
Date: Wed, 8 Jul 2009 11:50:35 -0700

I'm trying to get a stand alone jersey/grizzly service working with AJP. I
have a simple setup where I serve both dynamic and static content:

String path = "my path";
int port = 80;

GrizzlyWebServer gws = new GrizzlyWebServer(port, path.toString());

gws.enableProtocol(PROTOCOL.AJP);

// Jersey web resources
ServletAdapter jerseyAdapter = new ServletAdapter();
jerseyAdapter.addInitParameter("com.sun.jersey.config.property.packages",
"com.custom.resources");
jerseyAdapter.setContextPath("/jersey");
jerseyAdapter.setServletInstance(new ServletContainer());
gws.addGrizzlyAdapter(jerseyAdapter);

ServletAdapter staticAdapter = new ServletAdapter();
staticAdapter.setContextPath("/*");
staticAdapter.setHandleStaticResources(true);
staticAdapter.setServletInstance(new ServletContainer());
gws.addGrizzlyAdapter(staticAdapter);

gws.start()

however I get the following errors:

jvm 1 | Jul 8, 2009 11:43:21 AM com.sun.grizzly.http.jk.server.JkMain
init
jvm 1 | INFO: Can't find home, jk2.properties not loaded
jvm 1 | Jul 8, 2009 11:43:21 AM
com.sun.grizzly.http.jk.common.ChannelSocket init
jvm 1 | INFO: JK: ajp13 listening on /0.0.0.0:8009
jvm 1 | Jul 8, 2009 11:43:21 AM com.sun.grizzly.http.jk.server.JkMain
start
jvm 1 | INFO: Jk running ID=0 time=0/156 config=null

Is it possible to use AJP support without a webapp container? I'm a novice
with regard to webapps, containers, etc. so any pointers or help would be
appreciated.

Cheers,
Gonk