You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by alaricus <na...@gmail.com> on 2013/01/22 23:22:28 UTC
AJAX via crossdomain
Hi!I've faced some issue. When I run my AJAX-script in AMQ sandbox like
/mysite:8161/myapp/test.html/ all works. But if I run this script from
/mysite2/test.html/ and request /mysite:8161/myapp/amq/ all works but I
don't get any messages. I think that cause is in fact that in the second
case I get new JSESSIONID cookie each request.I attach my sources.
*web.xml*
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 session
org.apache.activemq.web.SessionFilter session /* cross-origin
org.eclipse.jetty.servlets.CrossOriginFilter allowedOrigins *
allowedMethods * allowedHeaders * cross-origin
/* org.apache.activemq.web.SessionListener
AjaxServlet org.apache.activemq.web.AjaxServlet 1
AjaxServlet /amq/*
*Page*
test amq
AMQ
--
View this message in context: http://activemq.2283324.n4.nabble.com/AJAX-via-crossdomain-tp4662054.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: AJAX via crossdomain
Posted by alaricus <na...@gmail.com>.
I've reveal that it happens due crossdomain requests don't send Cookie even
with allowed origin. Just another aspect of safety restrictions.
Now I'm working on it.
2013/1/23 dejanb [via ActiveMQ] <ml...@n4.nabble.com>
> Hi,
>
> I never tried running ajax through cross domain filter in jetty, but
> if it creates a new session for every request it surely will be
> problematic. Is there any way to turn that behavior off?
>
> Regards
> --
> Dejan Bosanac
> ----------------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4662089&i=0>
> Twitter: @dejanb
> Blog: http://sensatic.net
> ActiveMQ in Action: http://www.manning.com/snyder/
>
>
> On Tue, Jan 22, 2013 at 11:22 PM, alaricus <[hidden email]<http://user/SendEmail.jtp?type=node&node=4662089&i=1>>
> wrote:
>
> > Hi!I've faced some issue. When I run my AJAX-script in AMQ sandbox like
> > /mysite:8161/myapp/test.html/ all works. But if I run this script from
> > /mysite2/test.html/ and request /mysite:8161/myapp/amq/ all works but I
> > don't get any messages. I think that cause is in fact that in the second
> > case I get new JSESSIONID cookie each request.I attach my sources.
> > *web.xml*
> > 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 session
> > org.apache.activemq.web.SessionFilter session
> /* cross-origin
> > org.eclipse.jetty.servlets.CrossOriginFilter
> allowedOrigins *
> > allowedMethods *
> allowedHeaders *
> cross-origin
> > /*
> org.apache.activemq.web.SessionListener
> > AjaxServlet org.apache.activemq.web.AjaxServlet 1
> > AjaxServlet /amq/*
> > *Page*
> > test amq
> > AMQ
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://activemq.2283324.n4.nabble.com/AJAX-via-crossdomain-tp4662054.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/AJAX-via-crossdomain-tp4662054p4662089.html
> To unsubscribe from AJAX via crossdomain, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4662054&code=bmFya2lyQGdtYWlsLmNvbXw0NjYyMDU0fC00MjcxMjI0NDI=>
> .
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://activemq.2283324.n4.nabble.com/AJAX-via-crossdomain-tp4662054p4662115.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: AJAX via crossdomain
Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,
I never tried running ajax through cross domain filter in jetty, but
if it creates a new session for every request it surely will be
problematic. Is there any way to turn that behavior off?
Regards
--
Dejan Bosanac
----------------------
Red Hat, Inc.
FuseSource is now part of Red Hat
dbosanac@redhat.com
Twitter: @dejanb
Blog: http://sensatic.net
ActiveMQ in Action: http://www.manning.com/snyder/
On Tue, Jan 22, 2013 at 11:22 PM, alaricus <na...@gmail.com> wrote:
> Hi!I've faced some issue. When I run my AJAX-script in AMQ sandbox like
> /mysite:8161/myapp/test.html/ all works. But if I run this script from
> /mysite2/test.html/ and request /mysite:8161/myapp/amq/ all works but I
> don't get any messages. I think that cause is in fact that in the second
> case I get new JSESSIONID cookie each request.I attach my sources.
> *web.xml*
> 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 session
> org.apache.activemq.web.SessionFilter session /* cross-origin
> org.eclipse.jetty.servlets.CrossOriginFilter allowedOrigins *
> allowedMethods * allowedHeaders * cross-origin
> /* org.apache.activemq.web.SessionListener
> AjaxServlet org.apache.activemq.web.AjaxServlet 1
> AjaxServlet /amq/*
> *Page*
> test amq
> AMQ
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/AJAX-via-crossdomain-tp4662054.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.