Open FarzinZaker opened 11 years ago
Did you try with the default transport
and fallbackTransport
? Could you post your server.xml? Also, check the exact version of tomcat you are using since older 7.0.XXX didn't implement servlet v3.0.
I have tested it. but does not work.
the problem occured because I have provided options in grails.Events. by changing to this, exception solved.
var receivedOrders = new Array();
var grailsEvents = new grails.Events("${rootPath}");
function handleOrderEvent(data){
try{
if(data.id){
if (receivedOrders.indexOf(data.id) == -1) {
receivedOrders[receivedOrders.length] = data.id;
var url = "<g:createLink controller="orderAdministration" action="orderNotification"/>";
$.ajax({
type: "POST",
url: url,
data: { id: data.id }
}).done(function (response) {
if (response != "0") {
$.msgGrowl({
type: 'info', sticky: true, 'title': '${message(code: 'order.notification.title')}', 'text': response, lifetime: 5000
});
}
});
}
}
}catch (e) {
// Atmosphere sends commented out data to WebKit based browsers
}
}
grailsEvents.on('order_event', handleOrderEvent, {transport:'long-polling', fallbackTransport:'polling'});
but still no event is propagated to client!
I have an apache webserver in front of tomcat. events fired in services but not in javascript.
I cannot help you since I never used long-polling. I can tell you that I had trouble with an apache webserver in front of tomcat with websockets. I had to switch to Nginx or allow access to the tomcat directly.
I have the same issue. Would be interested in a solution. I use Tomcat 7.0.42.
I am using Events-Push in my grails application. every thing is fine when running application from my IDE (IntelliJ Idea). but when I deploy it to tomcat (7.0) following exception raises:
myservlet config in web.xml is:
usage is
it seems some thing is wrong with tomcat configuration. any idea?