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

Home -> Community -> Usenet -> c.d.o.server -> Re: How common is it to write http sites in pl/sql

Re: How common is it to write http sites in pl/sql

From: John Russell <netnews4_at_johnrussell.mailshell.com>
Date: Sun, 02 Feb 2003 20:30:57 GMT
Message-ID: <okvq3v8fjai1biu191ps0kq98ebtb0bgef@4ax.com>


On Wed, 29 Jan 2003 11:44:56 -0000, Norman Dunbar <Norman.Dunbar_at_lfs.co.uk> wrote:

>Morning Marc,
>
>this webby stuff is popular today !
>
>I've written one single soliraty web site based on data held in an
>Oracle database.
>I've used PSP to do it - basically, using PL/SQL procs and packages to
>build a dynamic web page on the fly.
>It works brilliantly for me. :o)

All the dynamic pages at tahiti.oracle.com are written in PL/SQL. The biggest headache I find is dealing with & as the substitution character in PL/SQL, when writing out link URLs that include name-value pairs. :-)

I find the code is more readable if the big blocks of HTML are printed by a single statement instead of a separate call for each line, e.g.

htp.p('

<html>
<body>
<h1>Heading</h1>
<p>Text...
<table border="1">

');

... then a loop in PL/SQL to print the rows...

htp.p('

</table>
</body>
</html>

');

Also I find it useful to define little procedures (pagelets? :-) that print standard little bits of HTML, like startPage(page_title) to print the MIME type and the tags from <title> ... </title> down to <h1> ... </h1>, using the same text for both the title and the first h1.

John Received on Sun Feb 02 2003 - 14:30:57 CST

Original text of this message

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