Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to send console output to a html page

 
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
Pie
Posts: 20605
60
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic