jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes Generating HTML pages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Generating HTML pages" Watch "Generating HTML pages" New topic

Generating HTML pages

Luke Shannon
Ranch Hand

Joined: Sep 30, 2004
Posts: 239

I am building an application that generates static HTML pages based on the data in a database.

Does anyone know of any packages that exist for such a task, some sort of HTML template class or something like that? Anyone done this before and can offer some tips?


[ December 12, 2004: Message edited by: Luke Shannon ]

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Google for "java document management" and you'll find some pretty good open source projects. I found them a little huge and involved for what I needed and haven't actually tried any yet.

You might look at Java Wiki code like FrikiWiki (the author is here at the ranch) and Fitnesse. These do "real time" conversion of templates to HTML on a dynamic web server, but you could surely borrow some of the rendering ideas to use in batch to generate static HTML.

I generate static HTML for my hobby site in a scripting language (REXX) that lets me execute a block of code in a string so it was dead simple to embed script into my templates. It's described HERE but it looks like the link to dowload it is missing. Lemme know if it's at all interesting.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Luke Shannon
Ranch Hand

Joined: Sep 30, 2004
Posts: 239
Thanks Stan.

I am going to look through some of these open source options.

Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Also velocity and
FreeMarker. Both very suitable for generating HTML, with stuff from database.

Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Luke Shannon
Ranch Hand

Joined: Sep 30, 2004
Posts: 239
Freemarker looks very close to what I was searching for.

I agree. Here's the link: http://aspose.com/file-tools
subject: Generating HTML pages
Similar Threads
How to include a part of html code in to a jsp page?
Javascript - History browse back to prev page
What is JHTML?
Getting Page Source In The Servlet
Need to Keep Multiple Child Windows Open