GeeCON Prague 2014*
The moose likes Servlets and the fly likes Send a File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Send a File" Watch "Send a File" New topic
Author

Send a File

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi all,
I have developed a servlet which will stream a particular file from the server to the client. The client clicks on a link, and the servlet starts streaming the file.
My problem is, even after the file is streamed completely, the mouse pointer is not changing from busy state to normal state. What could be the problem. Should i send some more information in the header before streaming the file??..
Please help me on this.
regards
Rajesh
Phil Hanna
Ranch Hand

Joined: Apr 05, 2001
Posts: 118
Try setting the Content-length header.
------------------
Phil Hanna
Sun Certified Programmer for the Java 2 Platform
Author of :
JSP: The Complete Reference
Instant Java Servlets
Website: http://www.philhanna.com


Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072127686/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072124253/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">Instant Java Servlets</A>
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi hanna,
Thanks for ur response. I have already stated that, i tried sending the content length also. I am also flushing out the output stream. Still it gives the same problem. I don't know what should be passed at the end or at the begining. Is there any HTTP standard for sending this???.
Maky Chopra
Ranch Hand

Joined: Apr 11, 2001
Posts: 149
rajesh_bala,
The javaranch has a naming policy and your login name does not meet the requirement.
Please signup again with a proper name.
Thanks..
 
GeeCON Prague 2014
 
subject: Send a File