Reading response from the servlet

Discussion in 'Java' started by Madni, Nov 14, 2005.

  1. Madni

    Madni Guest

    I am developing a servlet that will upload the file on a server and
    respond the client with the success/failure message .The HTMl page that
    the client wil use to browse and sumbit the file to the server, i want
    it there remained open and a display of message box (using javascript)
    showing success/failure message .how can i use httpservletresponse
    method to return string to the client that could be used for the
    display of message box .

    Thanks
     
    Madni, Nov 14, 2005
    #1
    1. Advertising

  2. Madni wrote:
    > I am developing a servlet that will upload the file on a server and
    > respond the client with the success/failure message .The HTMl page that
    > the client wil use to browse and sumbit the file to the server, i want
    > it there remained open and a display of message box (using javascript)
    > showing success/failure message .how can i use httpservletresponse
    > method to return string to the client that could be used for the
    > display of message box .
    >
    > Thanks
    >


    I do not think there is an easy way of doing this,
    with AJAX you can send a xml request and read the response,
    but you can't send a file with ajax.

    So better is to just submit the pagina and return with a html page
    that has a javascript in it that pop-ups a message.
     
    Tjerk Wolterink, Nov 14, 2005
    #2
    1. Advertising

  3. Madni

    Madni Guest

    Dear Tjerk ,

    Thanks a lot for your suggestion ...I used it and it works very well .

    Best Regards,
    Madni
     
    Madni, Nov 15, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Fish
    Replies:
    4
    Views:
    2,451
    Andy Fish
    Dec 17, 2003
  2. Sean Clarke
    Replies:
    1
    Views:
    1,950
    Sudsy
    Jan 7, 2004
  3. circuit_breaker
    Replies:
    2
    Views:
    2,091
    Jack Jia
    Apr 4, 2004
  4. chamikara
    Replies:
    1
    Views:
    49,974
  5. DiscoStu
    Replies:
    0
    Views:
    532
    DiscoStu
    Jul 8, 2004
Loading...

Share This Page