users@grizzly.java.net

newbie help: read from console, send to browser

From: falcon <shahbazc_at_gmail.com>
Date: Tue, 1 Jul 2008 21:07:02 -0700 (PDT)

I haven't done web related projects for many years so please excuse me if I
missed something simple.
How do I send messages to a website, straight from my Java application
(perhaps using the Bayeux protocol)?

For example, say my Java program reads user input from the console in a
loop. Every time the user types something and presses enter, it is sent to
web browsers listening to the relevant 'channels.'

My real goal is to push JMS topic messages to my web application!

I have played around with grizzly-cometd-webserver-1.8.0.jar and
grizzly-cometd-echo-1.8.0.war. I even tried loading my own servlet
(actually a modified version of the one here:
http://blogs.sun.com/swchan/entry/java_api_for_cometd) using the following
format:

java -jar grizzly-cometd-webserver-1.8.0.jar -p 8080 -a
grizzly-cometd-echo-1.8.0.war TestServlet

I put in a bunch of print statements in TestServlet, just to see how the
code is executed, apparently my servlet wasn't even picked up.

In any case, any pointers or example code will be appreciated.

Thanks
-- 
View this message in context: http://www.nabble.com/newbie-help%3A-read-from-console%2C-send-to-browser-tp18229898p18229898.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.