tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject deep web.xml problem
Date Fri, 23 Feb 2001 22:26:42 GMT
-Hi Tomcats

I have read all the postings concerning the correct setup for web.xml under
tomcat 3.2.1.  I did not see a posting that describes my problem.   I am
testing the coreservlets.ShowMessage servlet and the
tso.servjsp.servletapi.SimpleInitServlet.    Both servlets should display
init-params after doGet() embeds in HTML.

I have debugged and debugged and debugged for a few days now and I am
I have my webapp\test context debug=9, and also using lots of
System.out.println() in the init() and doGet() methods.
I have <load-on-startup> set for both servlets, so when Tomcat starts I see
my messages and we are 100% sure that web.xml is read when servlets are
loaded..., BUT doGet() method returns null for all init-params, every time
in both servlets.  I have used init() with and without the ServletConfig

It seems inconsistent that when I remove the <load-on-startup>, then the
1st envocation of init() also returns null for all init-params.  Tomcat
acts like he can see the init-params if he pre-loads the servlets, but
otherwise Tomcat seems to be a blind cat.

See here for yourself, this is screen scrape from Tomcat log when I have
<load-on-startup>... You can see both servlets loading and web.xml being
read ok...

2001-02-23 04:22:26 - Ctx( /va3test ): XmlReader - init  /va3test
2001-02-23 04:22:26 - ContextManager: SimpleMapper1: SM: extension map
/va3test/*.jsp Ct (jsp(org.apache.jasper.servlet.JspServlet/null) )
2001-02-23 04:22:26 - Ctx( /va3test ): Reading D:
2001-02-23 04:22:26 - ContextManager: AccessInterceptor: Init  null
/va3test null
2001-02-23 04:22:26 - Ctx( /va3test ): Loading -2147483646 jsp
2001-02-23 04:22:26 - Ctx( /va3test ): Loading -2147483646 ShowMessage
init() says message = This Is Web.xml message
init() says repeats = 10
2001-02-23 04:22:26 - Ctx( /va3test ): Loading -2147483646
init() says mydriver = Hi, I am driver
init() says myurl =
init() says myuserID = meUserid

Yet, when I point my browser at the same servlets, I get null value for all
params... HELP :(

my conclusions from 4 days of debuggin:
1) Running Apache 1.3.14 with Tomcat 3.2.1 on NT4.0 and jre 1.3.0-C.
2) The problem must not be the location of web.xml since Tomcat finds it
when <load-on-startup>.
3) The problem must not be init(), for same reason.
4) The problem must not be the web.xml syntax for same reason.
5) The doGet() must be ok, because it shows null for all the values.
6) The Browser does not have old copy of page in cache because we empty
cache before each http request.

Can anyone help, please?  Regards.

View raw message