File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp and text file

 
ibnu ros
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a project using jstl. how can I query data from my sql server and fetch into text file and user can download that text file.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would have nothing to do with JSTL or JSP. If you want to return a text file as a response, simply emit the text as the response and set the content-type to "text/plain".

If you want to force a download (rather than displaying in the browser), be sure to set the content-disposition such that the response is an attachment. (Do a search for exact syntax.)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic