• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sending an XML file form servlet to client

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all!

I am having a bunch of XML files in a particular directory at my server end. The servlet can access the directory. The clients are supposed to access the home page of this website which lists the names of these xml files. The file names are stored in a database and are accessible easily. When the client clicks on the names of that XML file seen on the jsp page, I need to pick up that file and transfer to the client. How can this be done? I am using only 1 servlet for this small application. Any ideas?

Regards,
Murad.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
where you really have the problem
 
Murad Iqbal
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I dont know how to do is 'to send a file to the client throught servlet after the client clicks on a particular xml file name. its similar to downloading a file.' I guess it has to go throught the servlet...
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds quite simple to me. But may be I am not getting the real context of the problem.

- just store the the file names along the real paths of the files.
- make a link in your jsp page. that the user can right click over it and save the target as whatever.

not sure if you are expecting something else. but deserve a thanks because just placed your post on the top of the list again.

cheers
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic