tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chris hutchings <>
Subject New to servlets: Parameter initialisation in web.xml
Date Mon, 20 Aug 2001 13:53:01 GMT
Thanks for the replies, but perhaps I was a bit vague
in my description.

I have written a couple of example servlets which I
placed in the \webapps\ROOT\WEB-INF\classes folder,
and these work ok

The next example that I tried involved setting an
<init-param> parameter in web.xml (for a counter) and
a servlet that would use this value.
(all copied out of a book)

Since I was using the \webapps\ROOT\WEB-INF\classes
folder for my servlets, I altered the web.xml in

The servlet executed ok, but the variable was not
initialised – I printed it out an it was ‘null’ 

i.e. the servlets executing from
\webapps\ROOT\WEB-INF\classes can not see the params
specified in ROOT/WEB-INF/web.xml.

hmm, why is this?

i can now get the supplied examples to work,.

thanks  chris.

Do You Yahoo!?
Get your free address at
or your free address at

View raw message