velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Attila Szegedi <szege...@freemail.hu>
Subject Re: How can a list of available templates be obtained?
Date Sat, 30 Mar 2002 21:19:53 GMT
Given that a class loader can be defined such that it loads dynamically
generated resources, a getResourcePaths() would eventually have to be able
to return an infinite collection.... while this is an extreme case, it is
not disallowed by any specification... What Gear calls "large space" can be
even "infinite space", or "partially unknown space" (take for instance
loading resources over HTTP relative to a base URL - you can't enumerate all
available URLs, at least not in absence of WebDAV).

Attila.


----- Original Message -----
From: "Ben Peter" <bpeter@zentropypartners.com>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Thursday, March 28, 2002 10:58 PM
Subject: Re: How can a list of available templates be obtained?


>
> Yes, I feared that, and it makes sense. However, it would be nice if
> java.lang.Classloader had something similar to ServletContext's
> getResourcePaths(String path), which gives you all available resources in
one
> package/directory.
>
> [snip]
>
> > What you might do is extend the JarResourceLoader and use the
Application
> > Attributes (see dev guide) feature to allow your app level code to talk
to
> > the loader.  Then your loader can do fancy things for you and make them
> > available to the app.
>
> Hm, I'll probably not go that far, as it is only a matter of making
deployment
> easier. I'll probably just generate a list of templates at deployment time
and
> read that from a config file.
>
> If I find the time, I'll probably look at whether something of general use
can
> be added to the JarResourceLoader, if that is of any use to others as
well.
>
> Thanks a lot for your answers.
>
> > geir
> --
> Benjamin Peter                                          +49-69-96244395
> Application Engineer                             Moerfelder Landstr. 55
> (zentropy:partners)                            60598 Frankfurt, Germany
>
>
> --
> To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>
>
>
>
>


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


Mime
View raw message