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

        It's obviously not perfect, but it would've solved the problem.
Unfortunatly, it didn't work.  I used your syntax and then I also tried,
"servlets.default.initArgs=testing=Success!" because I wasn't sure why the
=initArgs would've been needed.  Well, the script returned null either way.
        Apperently everyone on my virtual server is having this problem, but hardly
anyone is running servlets, so no one's made much noise about it.  I tried
installing Cocoon, and ran into it.  They can't seem to work it out, and I'm
really not amused.

Thanks though,
Matt

-----Original Message-----
Subject: RE: initargs not being passed
I've also seen problems using the proscribed syntax for passing initArgs to
servlets, which I can only assume are bugs.  (which version of JServ are you
using?).  If possible, you might try this syntax, which I've had better luck
with:

servlets.default.initArgs=initArgs=testing=Success!

note that that's servlets not servlet.

Obviously, this doesn't work if you need different values for different
servlets...

jae

> -----Original Message-----
> From: Matthew Smith [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 03, 2000 3:57 PM
> To: Jserv List (E-mail)
> Subject: initargs not being passed
>
>     I can't get any servlet to recieve an initarg.  I'm
> almost positive the
> problem is not in the servlets or the lines passing the
> initargs in the
> zone.properties files, but I'll include a copy of that stuff
> anyways.  This
> is really haulting my work, and I'd really appretiate anyone
> who could clear
> it up.
>
> Thanks,
> Matt
>
>       This is for testing.  The output from the InitHello
> class is "Here's the
> initarg: null".
>
> # A line from my zone.properties file:
> servlet.InitHello.initArgs=testing=Success!
>
> // And here's my InitHello.java
> import java.io.*;
> import java.util.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class InitHello extends HttpServlet
> {
>     String initpass;
>
>     public void init(ServletConfig config)
>         throws ServletException
>     {
>         super.init(config);
>         initpass = getInitParameter("testing");
>     }
>
>     public void doGet (HttpServletRequest request,
>                        HttpServletResponse response)
>         throws ServletException, IOException
>         {
>             PrintWriter out;
>             // set content type and other response header fields first
>             response.setContentType("text/html");
>             // then write the data of the response
>             out = response.getWriter();
>             out.println("<HTML><HEAD><TITLE>");
>             out.println("Servlet InitArg Test");
>             out.println("</TITLE></HEAD><BODY bgcolor=\"#FFFFFF\">");
>             out.println("<H1>Here's the initarg: " + initpass
> + "</H1>");
>             out.println("</BODY></HTML>");
>             out.close();
>         }
> }
>
> // End of InitHello.java
>
>
>
> --



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives:
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to