Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using response.setHeader("Content-Disposition", "inline; filename=filename.csv") in post method

 
Bennet Xavier
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

i have huge data to be sent to the server and based on data i need to download content from server(server in turn fetches data from Database).

i tried using post method, to post huge data into server.

i am getting the content. but i am not getting the pop up.(which say "Save or Open").

when i used the response.setContentType("application/csv"); and response.setHeader("Content-Disposition", "inline; filename=TestingFile.csv"); in post method

the window appears for save or open is not appearing.

how can i archive this.

Please tell me.

Thanks In Advance,

Bennet Xavier. X.
 
Krishnan Iyer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Bennet,

Can you try using this??

response.setHeader("Content-Disposition", "attachment; filename=filename.csv") ;

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic