Chris,
I'm not sure I understand what you are doing exactly. You've mentioned that
you put a copy of the default web.xml file in your application directory,
but you have mentioned that you edited the file to reflect your
application, so I'm beginning to guess that you haven't done that. If you
haven't already done this, read Chapter 13 of the Servlet specification
(http://java.sun.com/products/servlet ) to get an idea of what the
different elements are used for. I'm by no means an expert on this, but the
web.xml file is the "deployment descriptor" of a web application - if you
put one in your application's directory structure, you need to edit it to
provide the information that's specific to your application. The default
web.xml file isn't going to help you in your application deployment because
it has information specific to the servlet container itself. You might take
something like the web.xml file from the examples directory and edit it to
represent your specific web app. If the web.xml file doesn't describe the
specific application, it doesn't really have any point to being there. Hope
this helps.

Michael


At 11:02 AM 4/24/01 +0200, you wrote:
>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