you were faster than me :)
for a complete setup, Deployer should be a good example. Look how the
Serlvet is deploy for a web.xml
and the testcase under
C:\Source\grizzly_new\grizzly\code\modules\http-servlet\src\test\java\com\sun\grizzly\http
2010/2/2 Paul.M <paul.mattheis_at_gmail.com>
>
> I have this working now... I am not sure about the context, rootPath, etc.
> But it works :) I get my static content from /var/www, and cometd from
> /cometd/* (Which I think let's the servlet be cometd). It also looks like
> the important thing is to get setHandleStaticResources correct on both.
>
> public static void main(String args[]) {
> try {
> GrizzlyWebServer ws = new GrizzlyWebServer(8080, "/var/www");
>
> ws.addAsyncFilter(new CometAsyncFilter());
> CometdAdapter cometdAdapter = new CometdAdapter();
> cometdAdapter.setHandleStaticResources(false);
> ws.addGrizzlyAdapter(cometdAdapter, new String [] { "/cometd/*"
> });
>
> GrizzlyAdapter ga = new GrizzlyAdapter() {
> @Override
> public void service(GrizzlyRequest request, GrizzlyResponse
> response) {
> System.out.println(request.getMethod() + " " +
> request.getQueryString());
> }
> };
> ga.addRootFolder("/var/www");
> ga.setHandleStaticResources(true);
> ws.addGrizzlyAdapter(ga, new String[]{"/*"});
>
> ws.start();
> } catch (IOException ex) {
> }
> }
>
> --
> View this message in context:
> http://old.nabble.com/Am-I-crazy--Yes...-tp27316206p27429124.html
> Sent from the Grizzly - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>
--
-------------
A+
Sébastien.
Vous pouvez me suivre sur Twitter / You can follow me on Twitter :
http://twitter.com/survivant