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

Oops, read your message again.  More to the point, unless you defined
InitTest.initArgs to be your .properties file for that JServ instance, it's
never going to see that initArg.

You should try putting that line in your myzone.properties file (or whatever
you called it in the jserv.conf file.  There should be a line like this:

myzone.properties=c:\pathtomyzone\myzone.properties


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Martin
> Widmer
> Sent: Wednesday, March 01, 2000 3:36 AM
> To: Java Apache Users
> Subject: Can't get initargs to work with .initArgs file.
>
>
> ----------------------------------------------------------------
> 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!!!
> ----------------------------------------------------------------
>
> Hello
>
> I got a problem with the initargs mechanism too. I use
>
> Win95
> Apache 1.3.9
> JServ 1.1
>
> My test servlet looks like this:
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class InitTest extends HttpServlet {
>
>       static String strInit;
>
>       public void init (ServletConfig conf) throws ServletException {
>               super.init(conf);
>               try {
>                       strInit = conf.getInitParameter("init");
>               }
>               catch (Exception e) {
>                       strInit = e.toString();
>               }
>       }
>
>       public void doGet(HttpServletRequest req,
> HttpServletResponse res) throws
> ServletException, IOException {
>
>               // prepare output writer
>               res.setContentType("text/html");
>               PrintWriter out = res.getWriter();
>
>               out.println("<HTML>");
>               out.println("<HEAD><TITLE>InitTest</TITLE></HEAD>");
>               out.println("<BODY>");
>               out.println("Value of strInit:" + strInit);
>               out.println("</BODY>");
>               out.println("</HTML>");
>       }
> }
>
>
> and along with the servlet I put a file called
> InitTest.initArgs in the
> same directory. It's contents look like:
>
> [EMAIL PROTECTED]
>
> The problem is, I never get the value of that parameter
> "init", I always
> get null. Any suggestions ?
>
> Martin
>
>
>
> --
> --------------------------------------------------------------
> 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