quick start
Submitted by mingfai on Thu, 06/05/2008 - 02:35.
For the very latest, see cometd-java.
Download, Install Run
To download and run:
- Download latest Jetty release, currently 6.1.16 is latest
- Unzip folder from archive
- Open command line, go to new folder and run "java -jar start.jar" - "Started SelectChannelConnector@0.0.0.0:8080" indicates successful startup
- Take a look at the cometd demos at http://localhost:8080/cometd/
Checkout, Build and Run
To build and run from a checkout, you need java 1.5 and maven >2.0.8 installed:
svn co http://svn.cometd.com/trunk cometd cd cometd mvn cd cometd-jetty mvn cd demo mvn jetty:run-war
This will run a demo jetty server on port 8080.
Import into Eclispe
- Install m2eclipse plugin http://m2eclipse.codehaus.org/
- Use Maven Import Wizard to import projects into workspace: File -> Import -> Maven Projects -> Select .../jetty-6.1.x/contrib/cometd as root directory, Finish
- Start cometd chat demo by starting dojox.cometd.demo.CometdDemo (eg. right click, Run As -> Java Application)
What the demo includes
- Chat, echo and timesync demos
- Dojo, jquery and java clients
- The chat demo has necessary code in client to handle transient network failures and server restarts.
- The server code includes BayeuxStartupListener example with instances of BayeuxService class to handle server side subscriptions and services, such as monitoring, echo service and chat room member list.
»
- Printer-friendly version
- Login to post comments