--
Hello Mark,
is far as i understood the config-files, you can attach properties
to servlets by referring to the full name of its class, including
the whole package-path, or by referring to its alias.
I would suggest to try to assign the following values:
masterpackage.subpackage.myservlet.database.name=MyDataBase
if your servlet reside inside the package masterpackage.subpackage.
of course don't forget to restart the werbserver to force it to
reload the jserv.properties file.
hth,
Thomas
--
Thomas Landgraf, Dipl. Inform.
Dr. Materna GmbH Tel: +49 (0)231 5599-578
44141 Dortmund Fax: +49 (0)231 5599-574
Vo�kuhle 37 Abteilung IS-Projekte
> -----Urspr�ngliche Nachricht-----
> Von: Mark Foster [SMTP:[EMAIL PROTECTED]]
> Gesendet am: Dienstag, 29. Juni 1999 19:54
> An: 'Java Apache Users'
> Betreff: accessing servlet properties
>
> --
>
> Please forgive my ignorance, I am new to servlets...
> I have a jserv.servlets.properties file with lines like so:
>
> foobar.database.name=myDatabaseName
> foobar.database.username=visitor
>
> How can I access these from my servlet? Does the servlet have to be
> named foobar.class? I have tried
> System.getProperty("foobar.database.name") and
> System.getProperty("database.name") and neither work - I get a
> NullPointerException
> Do I have to create unique instance of the Properties class?
> Thanks for any help.
> --
> ========================================================+
> Mark Foster [EMAIL PROTECTED] ph4256880567x109 fx4256880590
> Altrec is now ONLINE! http://www.altrec.com/
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> READ THE FAQ!!!! <http://java.apache.org/faq/>
> Archives and Other: <http://java.apache.org/main/mail.html/>
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]