• 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 different types of data in HTTP response

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure if this is the right forum for this question, but it looked more appropriate than some others.

I am sending a file in a HTTPServletResponse to the client browser. So, I set the content type as follows:
response.setContentType("application/x-octet-stream");
response.setHeader("Content-disposition", "attachment; filename=" + file.getName() + ";");

I also have to send some other data that is not part of the file. Is it possible to do this?
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to send your stuff seperately, you can have a dynamic link point to an url to grab your file and transport the other stuff in the normal way.
 
Prema Chakravarthy
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, John Smith
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic