-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

the file name must be [servlet classname].initArgs In the config file there
is a typo stating for you to use .initargs 

-----Original Message-----
From: Bob Berman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 16, 1999 1:52 PM
To: Java Apache Users
Subject: difficulty using initArgs file


-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------


I am trying to set initialization parameters for my servlet and
noticed that there is a comment in the zone.properties file indicating
that I can put them in a file named {servlet name}.initargs in the same
directory as my servlet class. I am pretty sure my JServ 1.0 under
Apache 1.3.6 on Linux 2.2.9 is set up correctly - I can run the servlets
I want and there are no unusual messages in any log file I know of.

So, can I use a file called {servlet}.initargs to set initialization params?
It seems no matter what I do, I can't get anything out of the initargs
file for use by the class. Looking in the code
(src/java/org/apache/jserv/JServServletManager.java), it looks like the file
should really be named {servlet}.initArgs (case sensistive). I tried that
and still no luck. In the initargs file, I have a line like:

servlet.testsrv.initArgs=message=test123

in testsrv.initArgs in the same directory as testsrv.java and testsrv.class

My servlet testsrv normally runs fine. I try to fetch the init arg in the
servlet's init method, but wind up with "null" for the value of message.
Anyone have any ideas? Does this way of setting initialization params really
work? I've tried everything I can think of: rebooting Apache, restarting the
browser, recompiling the java source file into the class and nothing seems
to
work.

If I ever do get it working, how do initArgs work? Do they require an Apache
reboot or will the change to the initargs file automatically be picked up,
like when you recompile a class?

Thanks.



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to