tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Colebatch <>
Subject Re: New to servlets: Parameter initialisation in web.xml
Date Mon, 20 Aug 2001 13:19:25 GMT
When you add a context entry in server.xml, you create your own little
context.  the path that you name in docBase should contain a WEB-INF
directory, which contains its own web.xml file.  that is the web.xml file
that will be read for requests to that context.

if you're after a simple way to get started, I'd suggest editing the
HelloServlet from the examples context, and editing that then
recompiling... change the webapps/examples/WEB-INF/web.xml file for your
context params.

hth, cheers

On Mon, 20 Aug 2001, [iso-8859-1] chris hutchings wrote:

> Hi,
> i am new to servlets, and i am working through the
> examples in a servlets book,
> I have to set some <init-param> parameters in web.xml
> that are used in one of the examples init() method.
> Unfortunately the initialisation is not working
> properly and i get a 'null' when I print out the
> variable.
> what can i be doing wrong.
> i have used the web.xml in ROOT\WEB-INF 
> Also I have added a context path to server.xml, so
> that I can use my own named directories.
> But this does not seem to work either.
> I can run servlets in the
> \webapps\ROOT\WEB-INF\classes folder, but I can not
> get the servlets in the examples directory to work. 
> It must be something basic, with the configuration but
> what I do not know 
> Chris 
> ____________________________________________________________
> Do You Yahoo!?
> Get your free address at
> or your free address at

View raw message