I jar it and put the jar file to./WEB-INF/lib, restart and have the
following codes in index.jsp, it gave me NullPointerException. Same as put
.properties in WEB-INF/classes directory.
java.util.Properties props = new java.util.Properties();
java.io.InputStream is =
props.getClass().getResourceAsStream("/abc.properties");
props.load(is);
java.lang.NullPointerException
at java.io.InputStreamReader.(InputStreamReader.java:85)
at java.io.InputStreamReader.(InputStreamReader.java:74)
at java.util.Properties.load(Properties.java:176)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:66)
Thank you.
Wei
-----Original Message-----
From: Mauricio Nu�ez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 3:01 PM
To: Tomcat Users List; Xiao, Wei; [EMAIL PROTECTED]
Subject: Re: Properties files.
Hi
try this:
jar cvf properties.jar *.properties
move properties.jar to WEB-INF/lib
and restart!
bye
El Martes 26 Marzo 2002 15:56, Xiao, Wei escribi�:
> Hi all,
>
> I was trying to migrating an existing application to Tomcat 4.0. We used a
> lot of properties files and just specified the directory in classpath,
then
> we can call
> load("/abc.properties"). Where should I put properties files
(*.properties)
> in tomcat? How should I call to load it?
>
> Thanks a lot.
>
> Wei
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>