jon * wrote:
> 
> on 2/11/00 2:11 PM, christopher baus <[EMAIL PROTECTED]> wrote:
> 
> > I got a fairly recent build of the Turbine up and running on JServ and
> > MySQL.  Not to difficult to do.  I have question regarding the page
> > rendering engine.  I am writting a new navigation and what to include
> > straight HTML that was written by a designer. According to the FSD document:
> >
> > Like Screens, the Navigation modules can also call out to external code,
> > such as EJB's to get the business logic that is responsible for rendering
> > the Html that is sent to the browser.
> >
> > I'm a bit confused as how to accomplish this.  The Navigation seems to be be
> > tightly coupled to ECS.  I would like to bypass ECS and send a HTML stream.
> 
> One way would be to do something like this in a navigation module (pseudo
> code)
> 
> ConcreteElement build()
> {
>     filedata = readFileDataFromDisk();
>     return new StringElement(filedata);
> }
> 
> Simple eh? ;-) This would return the data exactly as it was read from disk.
> 
> You could add caching of the file data so that it would only have to be read
> once. Not real difficult...

Check out org.apache.jetspeed.portal.portlets.FileServerPortlet

This is exactly what it does however it also:

- allows you to define from XML what URL to spit out.
- Buffers the URL that you specified within a persistent disk cache so
if the URL is remote it doesn't refetch it everytime.
- Caches the Portlet after it was generated so that it can use the
in-memory version instead of doing a lot of work to rebuild itself.

Also, don't use StringElement for spitting out a file as it will escape
some of your characters.  Use ClearElement that is in the JetSpeed dist
and is also in the ECS that is in CVS.

<snip>
> > Also I am also considering using XSL/XML as the native layout format instead
> > of HTML, and having the final pages processed by Cocoon.  I'm sure there has
> > been discussion on this.  Could someone point me to a relavant thread.
> 
> The JetSpeed project has been doing this. Check out what Kevin has done...
> 
> <http://java.apache.org/jetspeed/>
> 
> Have fun!

Especially the portlet API and some of the Portlet developer docs.

-- 
Kevin A Burton
http://relativity.yi.org
Linux - The revolution will NOT be televised


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to