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: jhking <jhking_at_airmail.net>
Date: Mon, 21 Jun 2004 16:16:50 -0500
Message-ID: <cb7j2u$ert@library1.airnews.net>


There are also the oracle htp and htf packages to help you format your html. I find these often easier to work with because you don't have to worry about matching < and > and you don't have to worry about quoting. htf.bold( customer.first_name ) produces <b>Fred</b>. Christophe Vanfleteren wrote:

> 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
> 
Received on Mon Jun 21 2004 - 16:16:50 CDT

Original text of this message

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