Thanks, I'll look at Velocity. I also know that I can achieve what I
want using Freemarker, but really this doesn't seem like much of a
stretch for Tiles.

The <tiles:insert> tag already puts together seveal pieces of JSP code
before the servlet is generated by reading from a file. All I really
want to do is hand it a filestream that pulls information out of a
database instead of a filesystem.

I guess I'll take a quick look at the code for the insert tag. 


-R


On Thu, 10 Mar 2005 04:18:19 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
> Remember that ultimately, a JSP is a servlet, albeit one which is
> automatically created and compiled by transforming JSP syntax into
> Java.
> 
> You would need to intervene in this sophisticated and low-level
> process in order to store JSP code in a database and still have it
> work.  It's probably possible in theory, but likely far, far from
> practical.
> 
> Velocity is probably better suited to your use case; it can do all of
> the basic things that JSP can do, and it is possible to use a variety
> of "resource loaders" to get templates and template fragments; it
> comes with loaders which read from the file system and from the
> classpath; there may already even be one which gets templates from a
> database.
> 
> http://jakarta.apache.org/velocity
> 
> Joe
> 
> At 1:21 AM -0800 3/10/05, Richard Cox wrote:
> >Hi All,
> >
> >I am just coming up to speed on tiles and I have searched the archive
> >and not found the answer to this one.
> >
> >I want to import JSP "files" into my layout which are stored in a
> >database. The key issue is that there are JSP tags in the "file"
> >stored in the database that need to be evaluated as part of the page.
> >
> >I think a controller won't work because it returns information after
> >the JSP has been evaluated and the string in the database will contain
> >struts and JSTL tags which will get skipped.
> >
> >I think it is possible to get this effect from by extending the
> >DefinitionFactory class, but I am not sure.
> >
> >The other thought that I had was to get the source and extend the
> ><tiles:insert> tag so that instead of reading from a file, it reads
> >from the database. But that seems like overkill.
> >
> >Tiles looks great, and I think it can do 100% of what I need, but
> >right now I am missing the last  5% with this issue.
> >
> >Any thoughts or help is very much appreciated.
> >
> >-R
> >
> >[EMAIL PROTECTED]
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"  -The Ex
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to