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 content in text file

 
Bony Sen
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a StringBuffer into a text file and pushing it to output stream.The problem I am facing is that the entire jsp content is coming in the text file below the output. Does anyone know a way around this?

// setting response parameters
response.setContentType(Constants.CONTENT_TYPE_TXT);
response.setHeader(Constants.HEADER1, Constants.HEADER3
+ Constants.DC_PLT + Constants.END_QUOTE);
// getting the form
formBean = (FormBean) form;
out = response.getOutputStream();
fileContent = formBean.getFileContent().toString();
// Writing response to output stream
out.write(fileContent.getBytes());
out.flush();
out.close();
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic