You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Marinó A. Jónsson" <ma...@centrum.is> on 2004/02/17 16:07:46 UTC

Autoreload Global Macros?

I was going to try out the autoreload feature for a global macro lib and put
the following to entries into my velocity.properties:

file.resource.loader.cache = false
velocimacro.library.autoreload = true

... but it doesn't seem to work!

I came across this discussion from last fall:

http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg10512.html

so I tried the current CVS head (1.5-dev) but it still doesn't work.

I also found this comment from Nathan:

"i believe the 'velocimacro.library.autoreload = true' is not working
because the WebappLoader does not presently have functioning
isSourceModified() and getLastModified() methods.  the Servlet API does not
have any easy way to implement these." (
http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg10668.html )


If the feature isn't there it should be removed from the docs IMO - OTOH if
it's there can anyone tell me what I'm missing?

cheers,
Marinó

ps. a little nuance - the doctype-system attribute in the forumdemo web.xml
should be "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" not
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd" (note the underscore instead
of a dot) ... the bad URL is redirected to the correct one - but those of us
that map URLs to local copies of dtds (e.g. for fast validation and editor
enhancements) don't get redirected ;)



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


Re: Autoreload Global Macros?

Posted by Nathan Bubna <na...@esha.com>.
Marinó A. Jónsson said:
> I was going to try out the autoreload feature for a global macro lib and put
> the following to entries into my velocity.properties:
>
> file.resource.loader.cache = false
> velocimacro.library.autoreload = true
>
> ... but it doesn't seem to work!
>
> I came across this discussion from last fall:
>
> http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg10512.html
>
> so I tried the current CVS head (1.5-dev) but it still doesn't work.
>
> I also found this comment from Nathan:
>
> "i believe the 'velocimacro.library.autoreload = true' is not working
> because the WebappLoader does not presently have functioning
> isSourceModified() and getLastModified() methods.  the Servlet API does not
> have any easy way to implement these." (
> http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg10668.html )
>
> If the feature isn't there it should be removed from the docs IMO - OTOH if
> it's there can anyone tell me what I'm missing?

are you using the WebappLoader?  if so, then my comment still stands.  there's
no way to get autoreloading or cache refreshing type behavior with that
resource loader as it currently stands.  if you are using the
FileResourceLoader, then i thought the macro autoreload feature was in 1.4.
if it's not, then yeah, it should be pulled from the documentation until it
works.

oh, and this is really a user list question. ;)

Nathan Bubna
nathan@esha.com


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