-
3 Oct 2012 11:09 AM #1
Ext.Ajax issue With Serlvets 3.0 API
Ext.Ajax issue With Serlvets 3.0 API
Hello. I am using Tomcat 7 with Servlets API 3.0. When I make a request using the Ext.Ajax.request class, the request is never sent to the server and a "Comminucation Failure" error is thrown. I know this request never reaches the server because the Eclipse debugger never hits breakpoints.
I can use a call to the same servlet within a Form.Submit method, and that works - it hits the break points inside Eclipse. When I try to call the same Servlet in the Ext.Ajax class, it does not hit the server.
If I make a request to a PHP script, the Ext.Ajax class works fine.
Is this a bug with 3.x and Servlets 3.0? Or is there something I'm missing here?
Thanks for any ideas on how to fix this.
This works fine:
This does not:Code:if(UploadControls.formPanel.getForm().isValid()){ UploadControls.formPanel.getForm().submit({ url:"http://localhost:8080/fade_servlets/GetProjects", waitMsg: 'Uploading file...', success: function(form, action){ UploadControls_Handlers.FormPanel_sucess(form, action); }, failure: function(form, action){ UploadControls_Handlers.FormPanel_failure(form, action); } }); }
Code:var getProjectsRequest = Ext.Ajax.request({ url: "http://localhost:8080/fade_servlets/GetProjects", method: "POST", params:{ username: "behlingb" }, success:function(result, request){ HeaderControls_Handlers.GetProjectRequest_success(result, request); }, failure:function(result, request){ HeaderControls_Handlers.GetProjectRequest_failure(result, request); } })
-
3 Oct 2012 11:57 AM #2
Seems to be a problem with cross domain Ajax requests. Too bad JSONP is not included in 3.x
I'll have to take care of this with a server-side proxy.
-
3 Oct 2012 3:15 PM #3
Looks like you might have the wrong forums - this is for Sencha GXT. Is there another forum that it would make sense for me to move this to?
-
4 Oct 2012 6:54 AM #4
Yeah, this doesnt belong on this forum. Sorry, thought this was the ExtJS forum.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote