Thanks for ur reply. In my program it is res.setContentType("image/jpeg"); only. Only typing error.
Pls give me some solution. Kannan.T
Joined: Mar 22, 2005
Did you try what I suggested? If it didn't work, describe in more detail what you are trying to achieve, and what is actually happening.
Joined: Jul 20, 2006
I just want to download pdf or jpeg file from a servlet. I'm using the above code to do that. Pdf is downloading properly and on opening that downloaded pdf file it is openning properly in Adobe. Similarly, while downloading jpeg file [response.setContentType("image/jpeg");], the downloading is proper. I mean the same no of bytes downloads properly. But on openning that downloaded jpeg file a red colored X mark is comming on top left cornor of the browser. I'm unable to open the downloaded jpeg file. Please give me some solution.