activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: ActiveMq within tomcat 6
Date Tue, 02 Mar 2010 17:08:14 GMT
Hi,

your server config looks ok, seems like the problem could be on your web
page.

Do you have something like this configured in it

<script type="text/javascript" src="amq/amq.js"></script>
<script type="text/javascript">amq.uri='amq';</script>

You can also take a look at webapps/demo/chat.html (and chat.js) for some
examples on how to do it.

If it doesn't work, send your page that doesn't work.

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, Mar 2, 2010 at 5:06 AM, hmikhail <hmikhail@ksu.edu> wrote:

>
> Hello All,
> I am trying to use activemq within tomcat6 and interact from javascript
> using ajax, I am having lots of problems.
> When I deploy Tomcat I see in the log "Connector vm://localhost Started ,
> so
> I am guessing that the configuration is correct, but when I try to send
> messages from my javascript I get an error message from the Error console
> of
> forefox saying "amq is not defined".
> In CATALINA_HOME/CONF/context.xml I put
>   <Resource name="jms/ConnectionFactory" auth="Container"
> type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS
> Connection Factory"
>   factory="org.apache.activemq.jndi.JNDIReferenceFactory"
> brokerURL="vm://localhost" brokerName="LocalActiveMQBroker"/>
>
> I also added the following jar files to CATALINA_HOME/lib:
> geronimo-j2ee-management_1.0_spec-1.0.jar
> geronimo-jta_1.0.1B_spec-1.0.1.jar
> geronimo-jms_1.1_spec-1.1.1.jar
> activemq-web-5.3.0.jar
> activemq-core-5.3.0.jar
> activemq-all-5.3.0.jar
>
> In the web.xml file of my web-app I put:
>    <context-param>
>        <param-name>org.apache.activemq.brokerURL</param-name>
>        <param-value>vm://localhost</param-value>
>        <description>The URL of the Message Broker to connect
> to</description>
>    </context-param>
>
>    <context-param>
>        <param-name>org.apache.activemq.embeddedBroker</param-name>
>        <param-value>true</param-value>
>        <description>Whether we should
>  an embedded broker or not</description>
>
>  <servlet>
>    <servlet-name>AjaxServlet</servlet-name>
>    <servlet-class>org.apache.activemq.web.AjaxServlet</servlet-class>
>    <load-on-startup>1</load-on-startup>
>  </servlet>
>
>  <servlet-mapping>
>    <servlet-name>AjaxServlet</servlet-name>
>    <url-pattern>/amq/*</url-pattern>
>  </servlet-mapping>
>
> I really don't know how to make this work...would appreciate your help.
>
> Thanks,
> Henry
>
>
>
>
> --
> View this message in context:
> http://old.nabble.com/ActiveMq-within-tomcat-6-tp27752022p27752022.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message