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.


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

Results 1 to 2 of 2

Thread: non well-formed output

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Thanked 0 Times in 0 Posts

    Default non well-formed output


    I'm italian developer. I have a problem. I develope my simple web application using json-lib 2.3 and jquery for ajax call.

    My Servlet return json string generated with json-lib... for example:
    {"descrizione":"Questa la descrizione del computer","disponibile":false,"id":1,"nome":"Compu ter","prezzo":123.456}

    My jsp page contains a simple nutton that call follow js function:

    url: "json?method=prodotti",
    global: false,
    type: "POST",
    dataType: "json",
    success: function(msg){

    Application run correcty...

    Only problem is mozilla/firefox browser... In js console appears this message:

    Errore: non well-formed
    File sorgente: http://localhost:8080/JSonExample/json?method=prodotto
    Riga: 1, Colonna: 1
    Codice sorgente:
    {"descrizione":"Questa � la descrizione del computer","disponibile":false,"id":1,"nome":"Compu ter","prezzo":123.456}

    Why? How can I solve it?

    Sorry for my english. I hope solve my problem



  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Warrington, United Kingdom
    My Mood
    Thanked 156 Times in 152 Posts

    Default Re: non well-formed output

    I'm not sure what firefox is complaining about, is it complaining about the URL or the return?

    // Json

Similar Threads

  1. how to output using JLabel?
    By qaromi in forum AWT / Java Swing
    Replies: 1
    Last Post: August 30th, 2009, 02:09 PM
  2. OutPut.
    By chronoz13 in forum Java Theory & Questions
    Replies: 3
    Last Post: August 29th, 2009, 10:54 AM
  3. Replies: 3
    Last Post: August 19th, 2009, 11:30 AM
  4. Display output from a file using regular expression
    By jazz2k8 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: May 29th, 2008, 09:33 AM
  5. [SOLVED] Java program error in displaying Output
    By crazydeo in forum AWT / Java Swing
    Replies: 9
    Last Post: May 14th, 2008, 10:42 AM