This follows on from my questions from yesterday... still not solved... :-(

>From a fresh Tomcat install -- which worked, including the addition of a
simple "hello world" type context of my own -- I then tried to add my own
custom "web.xml" file.  As soon as I put this into my context's WEB-INF
folder, with no changes to the "default" version of "web.xml", I got the
following messages in the logs :

[stdout]:
Starting tomcat. Check logs/tomcat.log for error messages
cannot load servlet name: jsp
cannot load servlet name: default

[stderr]:
2001-04-23 03:20:05 - ContextManager: Adding context Ctx(  )
2001-04-23 03:20:05 - Ctx(  ): Removing duplicate servlet jsp
jsp(org.apache.jasper.runtime.JspServlet/null)
2001-04-23 03:20:05 - Ctx(  ): Removing duplicate *.jsp ->
jsp(org.apache.jasper.servlet.JspServlet/null)
2001-04-23 03:20:05 - PoolTcpConnector: Starting Ajp12ConnectionHandler on
8007
2001-04-23 03:20:05 - PoolTcpConnector: Starting Ajp13ConnectionHandler on
8009

I assumed that placing "web.xml" in a WEB-INF folder with Tomcat allowed the
developer to override default settings.  However, it seems that instead of
overriding settings, this cancels them out!!!  So, I tried removing the
default webapps in the "webapps" folder (admin, test, root, example), and
removed tomcat/conf/web.xml (the default), as well as my own one.

To my surprise, this actually still compiled my JSP pages!  Despite there
being no definition anywhere of a servlet to handle JSP requests!  (It's
worth noting here that I'm accessing Tomcat via its built-in HTTP connector,
not Apache or whatever).

So I decided then to put a copy of the default web.xml file within the
WEB-INF folder of my context (without restoring the default in tomcat/conf).
And another surprise: compilation failed with the exact same messages as
above in STDOUT and STDERR, complaining that these servlets were already
defined and would therefore now be removed as they were supposedly declared
twice...

Help!  How does this work?  What am I missing?  How can I define a full
"web.xml" file for my context without these problems?  I may for example
wish in some contexts to use the Jikes compiler instead of Javac, which
requires overriding the "jsp" servlet (and this is what I'm stuck on).

Many thanks for help,
Chris Brown

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to