tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Lipski" <piotr.lip...@cafafs.com.pl>
Subject Re: properties
Date Tue, 05 Dec 2000 14:11:26 GMT
Hi,

I think You can use ResourceBundle.getBundle(YourPackageName.YourClassName)
to get access to properies file (it should be named
YourClassName.properties).


Piotr Lipski

----- Original Message -----
From: "William Brogden" <wbrogden@bga.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, December 05, 2000 3:00 PM
Subject: Re: properties


:
:
: andreas ebbert wrote:
: >
: > Hi there,
: > does anybody know where
: > to put property-files for servlets
: > so that tomcat finds them?
: > I tried to place them in the
: > same location as the .class-
: > -file but that didn´t work, any
: > idea´s?
: >
: > regards,
: > andreas
:
: If you are going to open a file, you have to use a
: fully qualified path. Use web.xml to pass an initialization
: parameter to the servlet giving the absolute path to
: the properties file. Here is an example:
:
:     <servlet>
:        <servlet-name>saynumb.au</servlet-name>
:
: <servlet-class>com.JSPbook.Chap04.NumberSoundServ</servlet-class>
:          <init-param>
:             <param-name>basepath</param-name>
:
:
<param-value>c:\\tomcat\\webapps\\Root\\JSPbook\\Chap04\\sounds</param-value
>
:         </init-param>
:     </servlet>
:
:
: --
: WBB - wbrogden@bga.com
: Author of Java Developer's Guide to Servlets and JSP
: ISBN 0-7821-2809-2


Mime
View raw message