Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Reading response from the servlet

Reply
Thread Tools

Reading response from the servlet

 
 
Madni
Guest
Posts: n/a
 
      11-14-2005
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

 
Reply With Quote
 
 
 
 
Tjerk Wolterink
Guest
Posts: n/a
 
      11-14-2005
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.
 
Reply With Quote
 
 
 
 
Madni
Guest
Posts: n/a
 
      11-15-2005
Dear Tjerk ,

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

Best Regards,
Madni

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response javadev Java 5 11-16-2006 11:22 AM
Offending class: javax/servlet/Servlet.class chamikara Java 1 06-19-2004 05:42 AM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Tomcat: POST from one servlet or internal class to another servlet Sean Clarke Java 1 01-07-2004 02:22 PM
how to get my servlet configuration before the servlet is initialised Andy Fish Java 4 12-17-2003 09:47 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57