From: Lew on
John B. Matthews wrote:
> In article <hjuome$p2l$1(a)news.albasani.net>, Lew <noone(a)lewscanon.com>
> wrote:
>
>> Mike Schilling wrote:
>>> I don't think the project root is in the classpath. The normal wasy
>>> to make a resource available is
>> Depends on which of the three types of 'getResource*' methods you use. Those
>> in 'javax.servlet.ServletContext' include the project root.
>
> In this context, does "three types" mean those "getResource*" methods
> found in java.lang, java.beans.beancontext, and javax.servlet?

Four!

I had in mind Class, ClassLoader and ServletContext. Packages don't have methods.

--
Lew
From: Arne Vajhøj on
On 29-01-2010 18:56, Lew wrote:
> John B. Matthews wrote:
>> In article <hjuome$p2l$1(a)news.albasani.net>, Lew <noone(a)lewscanon.com>
>> wrote:
>>> Mike Schilling wrote:
>>>> I don't think the project root is in the classpath. The normal wasy
>>>> to make a resource available is
>>> Depends on which of the three types of 'getResource*' methods you
>>> use. Those in 'javax.servlet.ServletContext' include the project root.
>>
>> In this context, does "three types" mean those "getResource*" methods
>> found in java.lang, java.beans.beancontext, and javax.servlet?
>
> Four!
>
> I had in mind Class, ClassLoader and ServletContext. Packages don't have
> methods.

No, but you know perfectly well what he means.

Arne

From: Lew on
John B. Matthews wrote:
>>> In this context, does "three types" mean those "getResource*" methods
>>> found in java.lang, java.beans.beancontext, and javax.servlet?

Lew wrote:
>> Four!
>>
>> I had in mind Class, ClassLoader and ServletContext. Packages don't have
>> methods.

Arne Vajhøj wrote:
> No, but you know perfectly well what he means.

And answered what he intended to say. What's your problem?

--
Lew
From: John B. Matthews on
In article <hjvtht$qpt$3(a)news.albasani.net>, Lew <noone(a)lewscanon.com>
wrote:

> John B. Matthews wrote:
> >>> In this context, does "three types" mean those "getResource*"
> >>> methods found in java.lang, java.beans.beancontext, and
> >>> javax.servlet?
>
> Lew wrote:
> >> Four!
> >>
> >> I had in mind Class, ClassLoader and ServletContext. Packages
> >> don't have methods.
>
> Arne Vajhøj wrote:
> > No, but you know perfectly well what he means.
>
> And answered what he intended to say. What's your problem?

I thank you both for clearing that up. I had tried asterisks as
wildcards, but the meaning was even less clear.

I was intrigued by how the three packages implement the notion of
getting a resource: ClassLoader is foundational, while the bean approach
"allows a BeanContext implementation to interpose behavior between the
child Component and underlying ClassLoader." The ServletContext
implementation "does not use class loaders" at all but serves a similar
purpose relative to the servlet container's context.

This seems like a handy pattern to put in one's hip pocket.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
From: Arne Vajhøj on
On 29-01-2010 19:12, Lew wrote:
> John B. Matthews wrote:
>>>> In this context, does "three types" mean those "getResource*" methods
>>>> found in java.lang, java.beans.beancontext, and javax.servlet?
>
> Lew wrote:
>>> Four!
>>>
>>> I had in mind Class, ClassLoader and ServletContext. Packages don't have
>>> methods.
>
> Arne Vajhøj wrote:
>> No, but you know perfectly well what he means.
>
> And answered what he intended to say. What's your problem?

I don't think there were any reason to point out the obvious.

Arne