Hi,
I need to embed a web/comet server inside another server. Whenever the main
server is updated, I need to send out these updates to client's browsers
using comet. Since I need to embed the server, I am using some examples
from Jean-Francois's blog in the following manner:
public static void main(String[] args) throws IOException {
GrizzlyWebServer ws = new GrizzlyWebServer(8080,"./web/");
ws.addGrizzlyAdapter(new GrizzlyAdapter(){
@Override
public void service(GrizzlyRequest arg0, GrizzlyResponse arg1) {
//for some reason, if I don't add this dummy adapter, I get a 404 error
//with this, I get the index.html correctly...but this is not the issue
}});
ws.addAsyncFilter(new CometAsyncFilter());
ws.addGrizzlyAdapter(new CometdAdapter());
ws.start();
}
The problem is, I don't really understand where my cometd logic goes.
Do I need to create a servlet (as in this document:
http://docs.sun.com/app/docs/doc/820-4496/ghgxk?a=view)? That would mean
that I have to add a servlet adapter. I have no problem adding a servlet
adapter, but then what is the purpose of CometdAdapter?
I actually expected that I would pass in some sort of handler to the
CometdAdapter.
Can someone please help me out of this confusion?
Thanks
--
View this message in context: http://www.nabble.com/GrizzlyWebServer-to-working-comet-bayeux-web-client-tp20511957p20511957.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.