tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nathan phillips" <natha...@hotmail.com>
Subject Re: Trouble with my web.xml?
Date Thu, 01 Jan 1970 00:00:00 GMT
I believe you must define all your servlets before you define your servlet 
mappings.  Try it like this:


     <servlet>
              <servlet-name>dbConnect</servlet-name>
              <servlet-class>to.nod.servlets.dbConnect</servlet-class>
              <load-on-startup>1</load-on-startup>
     </servlet>

     <servlet>
             <servlet-name>linksPortlet</servlet-name>
             <servlet-class>to.nod.servlets.linksPortlet</servlet-class>
     </servlet>

         <servlet>
                 <servlet-name>Nod</servlet-name>
                 <servlet-class>to.nod.servlets.Nod</servlet-class>
         </servlet>


         <servlet-mapping>
                 <servlet-name>linksPortlet</servlet-name>
                 <url-pattern>/links</url-pattern>
         </servlet-mapping>

         <servlet-mapping>
                 <servlet-name>Nod</servlet-name>
                 <url-pattern>/app</url-pattern>
         </servlet-mapping>





From: "Greer, Darren (MED)" <Darren.Greer@med.ge.com>
Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
To: "'tomcat-user@jakarta.apache.org'" <tomcat-user@jakarta.apache.org>
Subject: Trouble with my web.xml?
Date: Mon, 18 Feb 2002 12:09:10 -0600
MIME-Version: 1.0
Received: from [192.18.49.131] by hotmail.com (3.2) with ESMTP id 
MHotMailBE3A8E69004F400431DFC0123183839F0; Mon, 18 Feb 2002 10:09:45 -0800
Received: (qmail 2817 invoked by uid 97); 18 Feb 2002 18:09:15 -0000
Received: (qmail 2753 invoked from network); 18 Feb 2002 18:09:14 -0000
>From tomcat-user-return-11330-nathanpp Mon, 18 Feb 2002 10:09:56 -0800
Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
List-Subscribe: <mailto:tomcat-user-subscribe@jakarta.apache.org>
List-Help: <mailto:tomcat-user-help@jakarta.apache.org>
List-Post: <mailto:tomcat-user@jakarta.apache.org>
List-Id: "Tomcat Users List" <tomcat-user.jakarta.apache.org>
Delivered-To: mailing list tomcat-user@jakarta.apache.org
Message-ID: 
<411301487662D411ADDB0090274F3A7505178E34@uswaumsx01medge.med.ge.com>
X-Mailer: Internet Mail Service (5.5.2653.19)
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N

Hey all.  While trying to run my application I am getting the following
err:
#################
org.xml.sax.SAXParseException: The content of element type "web-app"
must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*
,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mim
e-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,reso
urce-ref*,security-constraint*,login-config?,security-role*,env-entry*,e
jb-ref*,ejb-local-ref*)".
#################

Here is my web.xml:

##################
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd
<http://java.sun.com/dtd/web-app_2_3.dtd> ">

<web-app>
         <display-name>Nod.to</display-name>
         <description>Individuality</description>
         <context-param>
                 <param-name>Webmaster</param-name>
                 <param-value>Webmaster@nod.to</param-value>
         </context-param>
         <servlet>
                 <servlet-name>dbConnect</servlet-name>
                 <servlet-class>to.nod.servlets.dbConnect</servlet-class>
                 <load-on-startup>1</load-on-startup>
         </servlet>

         <servlet>
                 <servlet-name>linksPortlet</servlet-name>

<servlet-class>to.nod.servlets.linksPortlet</servlet-class>
         </servlet>
         <servlet-mapping>
                 <servlet-name>linksPortlet</servlet-name>
                 <url-pattern>/links</url-pattern>
         </servlet-mapping>

         <servlet>
                 <servlet-name>Nod</servlet-name>
                 <servlet-class>to.nod.servlets.Nod</servlet-class>
         </servlet>
         <servlet-mapping>
                 <servlet-name>Nod</servlet-name>
                 <url-pattern>/app</url-pattern>
         </servlet-mapping>
</web-app>
##################

As far as I know, everything I have in my web.xml is setup correctly.
Any insight would be great,

Darren




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message