Hi Mark, if you don't actually use Ajax to send messages, you should use REST API ( http://activemq.apache.org/rest.html) curl -d 'body=message' http://localhost:8161/demo/message/t1?type=topic This doesn't stop you from consuming your messages using Ajax however. Cheers -- Dejan Bosanac - http://twitter.com/dejanb Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Tue, Apr 20, 2010 at 4:13 PM, magellings wrote: > > Hello. I'm trying to get ActiveMQ AJAX to work but can't so far. > > I'm using fiddler, and when I post to our address of > "http://wamqdev1:10201/demo/amq" with request body of > "destination=topic://t1&message=message&type=send" I get a response with > the > exception below. The topic I'm posting to does exist. The AJAX portfolio > example also does work. The exception and my WEB.xml is below. > > Anyone have any ideas? > > > > > Error 500 A destination must be specified. > >

HTTP ERROR: 500

A destination must be specified.
>

RequestURI=/demo/amq

Caused > by:

java.lang.UnsupportedOperationException: A destination must be
> specified.
> at
>
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:195)
> at
>
> org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:300)
> at org.apache.activemq.web.WebClient.send(WebClient.java:214)
> at
>
> org.apache.activemq.web.MessageListenerServlet.doPost(MessageListenerServlet.java:214)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> at
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
> at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:43)
> at
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> at
>
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:324)
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> at
>
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
> at
>
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
> at
>
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> 
>

http://jetty.mortbay.org/ Powered by Jetty://


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> > > > > > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" > "http://java.sun.com/dtd/web-app_2_3.dtd"> > > > > ActiveMQ Web Demos > > Apache ActiveMQ Web Demos > > > > > org.apache.activemq.brokerURL > vm://localhost > The URL of the Message Broker to connect > to > > > > org.apache.activemq.embeddedBroker > true > Whether we should include an embedded broker or > not > > > > > > > AjaxServlet > org.apache.activemq.web.AjaxServlet > 1 > > > > MessageServlet > > org.apache.activemq.web.MessageServlet > 1 > > > > > > > QueueBrowseServlet > > org.apache.activemq.web.QueueBrowseServlet > > > > > PortfolioPublishServlet > > > org.apache.activemq.web.PortfolioPublishServlet > 1 > > > > AjaxServlet > /amq/* > > > > MessageServlet > /message/* > > > > QueueBrowseServlet > /queueBrowse/* > > > > PortfolioPublishServlet > /portfolioPublish > > > > session > org.apache.activemq.web.SessionFilter > > > > session > /* > > > > -- > View this message in context: > http://old.nabble.com/ActiveMQ-AJAX-Problems-tp28287864p28287864.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > >