This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Websphere and the fly likes how to send console output to a html page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "how to send console output to a html page" Watch "how to send console output to a html page" New topic
Author

how to send console output to a html page

Suresh Kumar Baddipudi
Greenhorn

Joined: Mar 09, 2009
Posts: 15
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. Please help me regarding this issue. Thanks in advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
What does this have to do with WebSphere (which this forum is all about)?

When you say HTML, do you mean you want to create a physical HTML file, or that this code should run in a servlet container and write an HTTP response?


Ping & DNS - my free Android networking tools app
Suresh Kumar Baddipudi
Greenhorn

Joined: Mar 09, 2009
Posts: 15
i need to create a physical HTML file only..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
Then you'd need to use the classes in the java.io package, particularly File, FileOutputStream, OutputStreamWriter and BufferedWriter. Be sure to pay attention to which encoding you're using, and to embed a META tag in the HTML file that specifies the encoding; it's probably best to use UTF-8.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to send console output to a html page