• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

File download servlet

 
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
 
I can't renounce my name. It's on all my stationery! And hinted in this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic