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

two things to try:  (which aren't really documented and aren't supposed to
make a difference, but I've found to work...)

1.
use
  [EMAIL PROTECTED]

instead of
  [EMAIL PROTECTED]

2.
if you can get away with it, use a default initArgs mapping, e.g.
[EMAIL PROTECTED]

These are sort of shots in the dark.  I don't really know which is "supposed
to" work

- jae

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