Prev: How to get an include-path of jni.h that is able to be different on different platforms.
Next: Can Someone please help me with my Computer stuff? 38889
From: Lew on 29 Jan 2010 18:56 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 29 Jan 2010 19:00 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 29 Jan 2010 19:12 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 29 Jan 2010 20:10 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 29 Jan 2010 22:10
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 |