Rickard Öberg wrote:
Anthony Eden wrote:

Are you trying to allow modifications of Velocity templates stored in an unexpanded WAR? There is not an easy way to do this as far as I know.


Well, it shouldn't be *that* hard, but it'd be a hassle when you do upgrades.... *shiver*

I think it is harder than you believe, at least if you want to make it portable. And then there is the case of upgrades as you point out.


This is not to say it can't be done but its probably not worth the hassle since the interface to files in the Servlet API is geared towards reading only.

I'm going to go out on a limb and guess that Rickard's system doesn't pull templates from the file system but rather from some sort of database.


Yup (from Jisp).

Velocity can pull template data from any ResourceLoader implementation. Therefore you can pull templates from the filesystem, databases, in-memory, or wherever they may reside as long as you provide the appropriate ResourceLoader implementation.


Or (as we do) you can simply give Velocity a String with the template. And of course, String's are easy to store in databases.

I assume you are not allowing the use of #parse or #include since if you are or plan on allowing it then you will need to use a ResourceLoader. Early versions of JPublish used strings which was fine until someone wanted to use the #parse and #include directives.


Sincerely,
Anthony Eden



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to