Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File download servlet

 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written a servlet that downloads a file. The file is downloaded properly , however, wherever i click on a URL, the dialog box that pops up for download shows message as ,
DownloadServlet from 192.167.8.99
where DownloadServlet is the name of the servlet that gets called and then my ip address. how can i display string like
demo.txt from www.mywebsite.com[/B]
do i have to add some special headers ???or what ?
When i download the file , by default the filename is my servlet name. i need to rename it.
How can i download a file using its original name?
TIA
Rashmi
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!