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.

Recommended Answers

All 2 Replies

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.

^ 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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.