tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Scott <nextstepsoluti...@yahoo.com>
Subject Re: Jar in war to access own property files - possible?
Date Fri, 11 Jul 2003 16:10:29 GMT
Actually, now its working using the
this.getClass().getResourceAsStream option!

Strange 

Thanks to everyone for their help,
Andy


 --- Andy Scott <nextstepsolutions@yahoo.com> wrote: >
Thanks for that,
> 
> I've tried:
> this.getClass().getResourceAsStream("/" + name);
> 
> This is in a class within the jar.
> 
> What differences does the
> Thread.getContextClassLoader() offer?
> 
> It isn't a static call, how would I use that in an
> ordinary class?
> 
> 
> Thanks in advance,
> Andy
> 
> 
>  --- Tim Funk <funkman@joedog.org> wrote: > You
> should
> be able to do this (I think)
> > 
> > Are you doing:
> >
>
Thread.getContextClassLoader().getResourceAsStream(...)
> > 
> > -Tim
> > 
> > Andy Scott wrote:
> > > Hi,
> > > I have a utility jar file that has classes using
> > > property files within the jar.
> > > This jar is then put into a war as part of a
> > seperate
> > > web application.
> > > When the webapp is run I get failures which seem
> > to be
> > > due to the fact that the classes in the jar
> cannot
> > > access the property files, also in the jar.
> > > Is this not possible?
> > > Andy
> > >  
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> >  
> 
>
________________________________________________________________________
> Want to chat instantly with your online friends? 
> Get the FREE Yahoo!
> Messenger http://uk.messenger.yahoo.com/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
>  

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

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


Mime
View raw message