954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Create HTML page using java

Hi, I need to create an html page to export some information. Currently, by using java, i've exported information to excel. But now, I need to export the information in HTML page using java.Is there any APIs I can use? Thanks.

androidf
Newbie Poster
15 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

don't know of any, since I never really had to do anything like this, but, worst case scnenario: you can write a class that creates a .html file and writes all the code in it. it's not different from writing a txt file, you'll just have to be more cautious about the special characters.

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

^ that's right. I've done quite a lot of that to provide remote interfaces to what would otherwize be just local Swing applications. You can simply write an HTML file like you would write any other text file, taking care with Java escape chars.
What's a bit more interesting is how are you going to get that HTML served up - you;ll be working with some kind of web server, or you can do it all in native Java with a Socket listening for and responding to HTML requests (Java SE) or use the inbuilt classes in Java EE.

JamesCherrill
Posting Genius
Moderator
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: