This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes jsp content in text file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp content in text file" Watch "jsp content in text file" New topic
Author

jsp content in text file

Bony Sen
Greenhorn

Joined: Dec 02, 2008
Posts: 23
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
 
subject: jsp content in text file
 
Similar Threads
How to write the content from document file to jsp page
DWR with Struts 1.3 to update the Formbean and refresh part of JSP page
socket response
Action Form Problem
forwarding response from Servlet to Jsp