This week's book giveaway is in the HTML, CSS and JavaScript forum.
We're giving away four copies of hapi.js in Action and have Matt Harrison on-line!
See this thread for details.
Win a copy of hapi.js in Action this week in the HTML, CSS and JavaScript 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
Posts: 20797
68
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
Boost this thread!