This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Bad file download problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Bad file download problem" Watch "Bad file download problem" New topic
Author

Bad file download problem

Prashanth Bhanu
Ranch Hand

Joined: Sep 25, 2003
Posts: 110
Dear All,

I'm trying to download a bad file which is being generated by the sql loader.Code depicted below of my servlet has downloaded .log file perfectly but .bad got a problem in getting download.I suspect


for unrecognized file types.

Can anybody help me in solving this issue please.



thanks in advance
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
What is "a problem"? TellTheDetails

Instead of

try


Ping & DNS - updated with new look and Ping home screen widget
Prashanth Bhanu
Ranch Hand

Joined: Sep 25, 2003
Posts: 110
Hi Ulf Dittmer,
Well i had manipulated the code to avoide unnecessary codes of ResourceBundle while posting.Infact,fullpath variable includes the file name and path of the file.

1.file which i'm trying to download is available
2.I'm not getting any exception at the server or at the client.




Prashanth Bhanu
Ranch Hand

Joined: Sep 25, 2003
Posts: 110
Hi Ulf,

The problem is,the file is not getting downloaded to the client.

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
Then what does happen? Is there an exception? If so, which one, and during which method call does it happen?

Why are you using a DataInputStream instead of a FileInputStream?
[ December 14, 2008: Message edited by: Ulf Dittmer ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bad file download problem
 
Similar Threads
making a download servlet to service download managers
file download time
Problem in downloading file from server using Http Response
error in dwonloading a pdf file
Unable to upload file