[Ajax] 404 not found and parsererror

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Ajax] 404 not found and parsererror

liny
This post was updated on .
Hi,

I installed ActiveMQ v5.5.1 and run "./bin/activemq console" without problem in Solaris server.
I can run examples successully, including Ajax web demo (stock portfolio example).
Now I am trying to write my own Ajax web page.
This is my topic producer/publisher Producer.java which run on my local computer and can put text message to ActiveMQ server without problem.
This is my web page index.html which run on my local computer with Tomcat 6 and intend to use Ajax to listen message on ActiveMQ server.

Below is error log from Firefox + firebug:
Error log by Firebug

I don't know what's wrong with it?
Can you help me?
Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: [Ajax] 404 not found and parsererror

liny
Any advice is appreciated.
Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: [Ajax] 404 not found and parsererror

dejanb
Put your page into demo folder and it will probably work. You are
referencing js libs with wrong paths.

Regards
--
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Mon, Nov 14, 2011 at 2:05 PM, liny <[hidden email]> wrote:

> Any advice is appreciated.
> Thank you.
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Ajax-404-not-found-and-parsererror-tp4022009p4039390.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: [Ajax] 404 not found and parsererror

liny
Hi, Dejan:

Thanks for reply. I will try it later.
As a newbie, I don't know why "../amq/amq.js" is used in demo, not "../js/amq.js".
Could you please help on http://www.manning-sandbox.com/thread.jspa?threadID=47130&tstart=0?
Reply | Threaded
Open this post in threaded view
|

Re: [Ajax] 404 not found and parsererror

dejanb
This post has NOT been accepted by the mailing list yet.
../amq/amq.js is used because it's where Ajax servlet is listening. See WEB-INF/web.xml on how it's configured.

    <servlet-mapping>
        <servlet-name>AjaxServlet</servlet-name>
        <url-pattern>/amq/*</url-pattern>
    </servlet-mapping>