----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

The answer is that you can't use the alias in the initargs line, so
the lines in my zone.properties file now read:
servlet.viewlog.code=ViewLogServlet
servlet.ViewLogServlet.initArgs=viewfile=/home/blabla/viewfile.txt

and it works...

Thanks to all who answered.

Adoram Rogel


Brett Knights wrote:
> 
> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
> 
> The syntax you reported looks correct. Are you sure you are modifying the correct 
>zone file? After an upgrade I spent quite a bit of
> time doing just that and getting quite frustrated that my mods weren't picked up/
> 
> ***********************************************************
> Brett Knights                             626-432-5767 work
> [EMAIL PROTECTED]                 626-355-1017 home
> ***********************************************************
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Adoram
> > Rogel
> > Sent: Tuesday, February 15, 2000 2:21 AM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: Can't get initargs to work
> >
> >
> > ----------------------------------------------------------------
> > BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> > WHEN YOU POST, include all relevant version numbers, log files,
> > and configuration files.  Don't make us guess your problem!!!
> > ----------------------------------------------------------------
> >
> > I installed Jserv 1.1 and JSDK 2.0
> > I compiled it as a module and added it to Apache 1.3.11
> > All this runs on a Linux 2.0.36 machine.
> >
> > I can run servlets, but can't get it to read zone.properties
> > to get the
> > initargs. I have a servlet called ViewLogServlet in
> > /usr/local/apache/servlets
> > I tried creating a ViewLogServlet.initarge in that directory, as the
> > zone.properties file suggests, but it didn't work. I tried adding the
> > initargs line into
> > /usr/local/apache/conf/jserv/zone.properties, but no
> > lucj there, too. I tried adding another zone and creating a
> > zone.properties file for that zone - again with no luck.
> >
> > In all cases in the following init function I get null for
> > viewfile and no init
> > parameters are found.
> >
> >     public void init(ServletConfig config)
> >         throws ServletException
> >     {
> >         super.init(config);
> >         viewfile = getInitParameter("viewfile");
> >         if (viewfile == null) {
> >             Enumeration initParams = getInitParameterNames();
> >             System.err.println("The init parameters were: ");
> >             while (initParams.hasMoreElements()) {
> >                 System.err.println(initParams.nextElement());
> >             }
> >             System.err.println("Should have seen one parameter name");
> >             throw new UnavailableException (this,"Not given a
> > viewfile to
> > show!\");
> >         }
> >     }
> >
> > This what I have in my zone.properties file:
> >
> > servlet.viewlog.code=ViewLogServlet
> > servlet.viewlog.initArgs=viewfile=/home/blabla/viewfile.txt
> >
> >
> > Any idea how to get this working ?
> >
> > Thanks, Adoram Rogel
> > and please CC me on the answer.
> >
> > *** Windows 2000 - from the people that brought you EDLIN ***


--
--------------------------------------------------------------
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