Ok, Now I believe. I traced to code back to the Java Core and it will
only take a file :(

But I am going to try using a controller to dump the file from the
database into a directory before it is "inserted" as a way around
this.

The reason for all of this is that we provide a web application for
our customers and customize it to look like their website for uniform
user experience. (Actually now that I say that it sounds like phishing
- but it's not) And we have a template for each customer (over 400 and
growing now).

Anyway the legacy system is freemarker ontop of plain ol servlets. We
are now moving to struts and tiles and I would like to have everything
uniform - their templates in JSP just like ours, but without having to
maintain hundreds of files in a file system.

It just may not be practicle like Joe said. 

Sure wish Sun had a hook for that. It wouldn't be that hard to have a
FileStream instead of a string to a file they are going to open now
would it? :)

-R


On Thu, 10 Mar 2005 10:04:54 -0800, Richard Cox <[EMAIL PROTECTED]> wrote:
> 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