Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Servlet is not working in IE

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Servlet is not working in IE

    I have a servlet in java.

    My servlet URL is http: //192.168.10.113:8080/collective-intellegence/UserClickPersonClassifier?userid=1&query=asp.net

    This URL is giving json data.

    I am using a jquery ajax call to get the data.
    function SecondResultLink(link, userId, userInput) {
    try{
        var urlSearch = "http://192.168.10.113:8080/collective-intellegence/UserClickLinkClassifier?userid=" + userId + "&query=" + userInput;
        $.ajax({
            url: urlSearch,
            type: 'POST',
            dataType: 'json',
            async: false,
            success: function (data) {
               alert('Success');
            },
            error: function (error) {
                alert(error.error);
            }
        });
    }
    catch (err) {
        alert(err);
    }
    }

    the above code is giving 45 records in Chrome,Firefox and Safari but giving 25 records in Opera and giving error message in IE.

    Error Message in IE:- function(){if(c){var a=c.length;m(arguments),i? k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))} return this}

    In all browser except IE request is going to server, but in IE not request is going to the server.

    This is not a cross domain problem because i allowed all to access the server(seen in the header that Access-Control-Allow-Origin: *)

    What is problem with IE? how to solve this issue or any other approach to get the data.

    Please help

    Thanks in advance


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Servlet is not working in IE

    The error being different between browsers suggests this is a client problem not a server problem - in other words it is not that your servlet is not working, it is that your javascript is not working, most likely an issue with your javascript/jquery syntax or linked javascript files. Given this is a java forum, I'd recommend trying your luck on a jquery or javascript dedicated forum.

  3. #3
    Junior Member
    Join Date
    Nov 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Servlet is not working in IE

    Thanks for reply
    I think request is going to server.

    but server is not able to send data so the ajax error is occurring.

Similar Threads

  1. Google Chart from database Servlet not working
    By bekimdisha in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 14th, 2012, 07:08 AM
  2. Replies: 0
    Last Post: March 11th, 2012, 04:57 PM
  3. What are the requirements to develop Servlet Application?
    By yousef atya in forum Java Servlet
    Replies: 2
    Last Post: July 28th, 2011, 06:20 PM
  4. collecting information/moving from servlet to servlet
    By CBird in forum What's Wrong With My Code?
    Replies: 0
    Last Post: March 1st, 2011, 07:04 PM
  5. Replies: 4
    Last Post: January 27th, 2009, 12:03 AM

Tags for this Thread