At 11:01 28.07.00 +0100, Andy Phelps wrote:
>This question is a more general servlet question rather than JRun (so please
>forgive).
>
>I am looking for a package which wraps HTML into a set of classes allowing
>me to generate HTML in a method call.
>I am aware of WebLogics htmlKona product which partially meets my
>requirements.  However, I would ideally like a package that reads the a HTML
>format layout (e.g h1 color) from an external file (say CSS) and format the
>HTML output accordingly (rather than formatting directly in the method
>call).  Does anyone know of such a (glorious) package?

Andy,

i'm not sure i understand your problem with "HTML formatting". HTML 
rendering is done by browsers, not by servlets. If you want to use CSS, you 
just have to link your stylesheets with your HTML, i.e. generate one HTML 
tag like

   <link rel="STYLESHEET" type="text/css" href="/mystyle.css">

If you want to create HTML from your servlet through a class interface 
instead of print() methods, you could try the "Element Construction Set" 
from the Apache Project:

   http://java.apache.org/ecs/index.html

Another possibility is to use the Document Object Model (DOM - 
http://www.w3.org) to create your HTML pages. This has the advantage that 
you can parse HTML templates into a DOM tree, modify it in your servlet and 
send it to the browser. This way your servlet code is mixed only minimally 
with your presentation code (HTML). The Enhydra Project has a nice product 
- XMLC - which works this way:

   http://www.enhydra.org

There are probably many other options...

Regards, Oliver

------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

Reply via email to