[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-user
Subject:    Re: Resource from a jar file
From:       Nathan Bubna <nbubna () gmail ! com>
Date:       2009-06-16 2:25:28
Message-ID: 4d651da50906151925x18bee5f4safaa4cab320879b9 () mail ! gmail ! com
[Download RAW message or body]

Yes, but at some point, many Velocity users will "ship" an app with
"finished" templates that the customer won't modify.  At that time, it
can make a lot of sense to just keep your templates in the classpath
or a non-classpath jar.  Guessing from user examples and questions,
the ClasspathResourceLoader is one of the more frequently used
loaders.  The JarResourceLoader is probably the least-used one.
Personally, i use the WebappResourceLoader from VelocityTools most.

On Mon, Jun 15, 2009 at 6:54 PM, Mark Fenbers<Mark.Fenbers@noaa.gov> wrote:
> Amidst this dialog, the thought occurred to me that templates are made to be
> customized (or what would be the point of Velocity?), and so I realized that
> these template really don't belong in a Jar file anyway.  If they were,
> people who know little about Java would have to un-jar the templates, modify
> them, and re-jar them before my app would read them.  So it now makes sense
> to just read these from the file system, rather than from a jar file...
>
> Thanks, anyway, as I learned some important things in the process.
>
> Mark
>
> Nathan Bubna wrote:
>>
>> Can you put your jar in the classpath and use the
>> ClasspathResourceLoader instead of going through the file system?
>> I've never used the JarResourceLoader, and i haven't really got time
>> to dig in and see why it isn't working for you right now...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic