Re: New to servlets: Parameter initialisation in web.xml

2001-08-20 Thread P.Miller
Hi chris, specified in a tag in the web.xml- context can be made available via the ServletConfig.getInitParameter("name"). If you put them in in the they can be made available via the ServletContext object (instead of the ServletConfig as above) --> ServletContext sc = ServletConfig.getServl

Re: New to servlets: Parameter initialisation in web.xml

2001-08-20 Thread Craig R. McClanahan
On Mon, 20 Aug 2001, 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 parameters in web.xml > that are used in one of the examples init() method. > Unfortunately the initialisation is not working > properl

Re: New to servlets: Parameter initialisation in web.xml

2001-08-20 Thread Matt He
Did you restart tomcat? matt - Original Message - From: "chris hutchings" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 20, 2001 8:53 AM Subject: New to servlets: Parameter initialisation in web.xml > Hi, > Thanks for the replies, b

Re: New to servlets: Parameter initialisation in web.xml

2001-08-20 Thread Rob S.
> I have written a couple of example servlets which I > placed in the \webapps\ROOT\WEB-INF\classes folder, > and these work ok Good =) > Since I was using the \webapps\ROOT\WEB-INF\classes > folder for my servlets, I altered the web.xml in > /ROOT/WEB-INF. Good so far... > hmm, why is this?

Re: New to servlets: Parameter initialisation in web.xml

2001-08-20 Thread Dmitri Colebatch
you have restarted after editing the web.xml haven't you? it only gets parsed at startup... other than that, check you're calling the right getInitParameter - not the method exists on config and servlet... depending on where your entry is in the config file, you will use one or the other. hth ch

New to servlets: Parameter initialisation in web.xml

2001-08-20 Thread chris hutchings
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 parameter in web.xml (for a counter) and a ser

Re: New to servlets: Parameter initialisation in web.xml

2001-08-20 Thread Dmitri Colebatch
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

Re: New to servlets: Parameter initialisation in web.xml

2001-08-20 Thread Rob S.
Eeek, I'm not sure where to start =) > I have to set some 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. Are you aware that web.xml only applies to the a

New to servlets: Parameter initialisation in web.xml

2001-08-20 Thread chris hutchings
Hi, i am new to servlets, and i am working through the examples in a servlets book, I have to set some 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