Reading response from the servlet

M

Madni

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
 
T

Tjerk Wolterink

Madni said:
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.
 
M

Madni

Dear Tjerk ,

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

Best Regards,
Madni
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top