tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chris hutchings <chris_hutchi...@yahoo.co.uk>
Subject New to servlets: Parameter initialisation in web.xml
Date Mon, 20 Aug 2001 13:53:01 GMT
Hi,
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
/ROOT/WEB-INF.

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 @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

Mime
View raw message