• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to send console output to a html page  RSS feed

 
Suresh Kumar Baddipudi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hi,
i wrote a java program, in that i used "System.out.println()" to print the output in the console. Now i want to print this output as a html page. output file is a simple physical HTML file. Please help me regarding this issue. Thanks in advance.
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out java.io.FileOutputStream or java.io.FileWriter. You can combine them with a PrintStream / PrintWriter to make it easier for you:

Don't forget to close the OutputStream!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!