Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Creating HTML files from Java accessing Oracle

Re: Creating HTML files from Java accessing Oracle

From: Christophe Vanfleteren <c.v4nfl3t3r3n_at_pandora.be>
Date: Mon, 21 Jun 2004 21:08:48 GMT
Message-ID: <A7IBc.162553$yP4.8339585@phobos.telenet-ops.be>


Roedy Green wrote:

> On 21 Jun 2004 13:40:55 -0700, mackdaddy315_at_hotmail.com (DM) wrote or
> quoted :
>

>>I guess I am looking for
>>methods that would make things easier rather than just outputting
>>print commands line by line. :)

>
> First use CSS.
>
> Then internally have objects provide their own wrappers, e.g.
> String getText()
> { return text; }
>
> String getHTML()
> { return "<span class=\"custname\">" + entify( text ) + "</span">; }
>
> Then you can knock out the HTML like this:
>
> out.println( thing.getHtML() + thing2.getHTML() );
>
> And you don't have to think about making tags balance.
>
> You can create code like this
>
> String li ( String body )
> {
> return "<li>" + body + </li>;
> }
>
> This is ever so much easier than trying to keep track of balancing
> yourself.
>

...

Or you could just use a templating engine like velocity.

http://jakarta.apache.org/velocity/
http://mindprod.com/jgloss/velocity.html

-- 
Kind regards,
Christophe Vanfleteren
Received on Mon Jun 21 2004 - 16:08:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US