OK, I think I've got it. Now, I've got a barebones sender and receiver pair, 
based on the example in the link below. I see the topic get created when I 
refresh the receiver, and it has a single consumer, as expected. When I run the 
sender to send to that topic, I am having issues trying to issue output to the 
web page on the receiver from within the message handler. I originally tried 
the example using the alert box. The only time I managed to get an alert to 
work was when I had an error in the JavaScript contained in the handler. Is 
there anything special I need to do to output from the handler? I've tried 
direct document.writes, alert with simple text, even jQuery output (both with 
and without the .ready function. Any suggestions?

Doug

-----Original Message-----
From: chubr...@gmail.com [mailto:chubr...@gmail.com] On Behalf Of Dejan Bosanac
Sent: Monday, September 14, 2009 12:34 PM
To: users@activemq.apache.org
Subject: Re: Chat JavaScript example

Hi Doug,

ajax client connects to the servlet (called AjaxServlet) that runs inside
jetty (or any other web container) that server like a proxy to the broker.
Therefore, you should all jms related stuff inside your web application.
Take a look at webapps/demo/WEB-INF/web.xml for an example of how to do it.

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Mon, Sep 14, 2009 at 5:45 PM, Knight, Doug <dkni...@mitre.org> wrote:

> All,
> From the JavaScript-based chat example, and various all-similar sources for
> how to configure it (i.e. see
> http://docs.codehaus.org/display/JETTY/Integrating+with+ActiveMQ for
> example), I don't understand how the JavaScript client knows what server to
> connect to. There is mentioned some info about adding to the web.xml, but is
> this used by the JavaScript app or the Jetty server on the server side? I've
> tried to "clone" the chat app to model my app after it (accessing a remote
> JMS topic to retrieve XML data, and display on a GIS map), with no success.
> I never get connected to the CHAT.DEMO topic. Any help on configuring both
> the client and server sides for a JavaScript app would be greatly
> appreciated. Once I get this working, I'd even be willing to share detailed
> info on the configuration I had to setup.
>
> Doug
>

Reply via email to