Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    bbehling is on a distinguished road

      0  

    Default 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:

    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);
                    }
                });
            }
    This does not:
    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);
                }
            })

  2. #2
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    bbehling is on a distinguished road

      0  

    Default


    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. #3
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Vote Rating
    89
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    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. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    bbehling is on a distinguished road

      0  

    Default


    Yeah, this doesnt belong on this forum. Sorry, thought this was the ExtJS forum.

Thread Participants: 1

Tags for this Thread