Hi Esteban

I think if WEB-INF/classes works, any other directory there will
work too.

Andreas

On 2 Dec 2002 at 12:59, Esteban González wrote:

> Thanks for your help andreas.
>
> It didn´t work with p.getClass..
>
> i´m trying with getServletContext().
>
> But my idea is to have WEB-INF/conf   to place all .properties
> files.
>
> is that possible?...
>
> Best regards,
> Esteban
>
> ----- Original Message -----
> From: "Andreas Probst" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, December 02, 2002 12:57 PM
> Subject: Re: Tomcat 4.0.3 & getResourceAsStream
>
>
> Hi Esteban,
>
> try
>
> p.getClass().getResourceAsStream("/WEB-INF/icard.properties");
> (inside WEB-INF) or p.getClass().getResourceAsStream("/WEB-
> INF/classes/icard.properties"); (inside classes) or
> p.getClass().getResourceAsStream("/WEB-
> INF/lib/icard.properties"); (inside lib)
>
> If this doesn't work, try
> getServletContext().getResourceAsStream(...)
> This one will work.
>
> Good luck.
>
> Andreas
>
> On 2 Dec 2002 at 12:33, Esteban González wrote:
>
> > Hi!
> > I´ve just moved an old app that we had running using Jserv to
> > tomcat4.0.3
> >
> > But i have problems with this
> >     p = new Properties();
> >     InputStream is =
> >     p.getClass().getResourceAsStream("/icard.properties");
> > I keep getting null no matter where i put the icard.properties
> > file.
> >
> > i´ve placed icard.properties inside WEB-INF/lib and
> > WEB-INF/classes and it´s also on the classpath...
> >
> > any workarounds to this issue?...  I´m trying not to use the
> > java.io.* approach...
> >
> > ----------------------------------
> > Esteban González
> >
> > Departamento de Sistemas
> > ASSIST-CARD International
> >
> >


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to