You have to list all of your servlet elements before listing any of the 
servlet-mapping elements.



On Thursday 03 July 2003 08:21 am, J. W. Ballantine wrote:
> Hi,
>
> I'm new to this, and quickly going blind looking at a web.xml.
>
> When I start tomcat I get the following error message during start-up:
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.24
> Jul 3, 2003 8:09:11 AM org.apache.commons.digester.Digester error
> SEVERE: Parse Error at line 34 column 11: The content of element type
> "web-app" must match
> "(icon?,display-name?,description?,distributable?,context-
> param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-
>conf
> ig?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,
>reso
> urce-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-
>ref* ,ejb-local-ref*)".
> 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?,mime-ma
>ppin
> g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,s
>ecur
> ity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-
>ref* )".
>
> The file in questions is:
> -------------top of file (not in 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";>
>
> <web-app>
>
>      <servlet>
>          <servlet-name> HelloWorld </servlet-name>
>          <servlet-class> HelloWorld </servlet-class>
>      </servlet>
>        <servlet-mapping>
>          <servlet-name> HelloWorld </servlet-name>
>          <url-pattern> /HelloWorld </url-pattern>
>        </servlet-mapping>
>      <servlet>
>          <servlet-name> HelloServlet </servlet-name>
>          <servlet-class> HelloServlet </servlet-class>
>      </servlet>
>        <servlet-mapping>
>          <servlet-name> HelloServlet </servlet-name>
>          <url-pattern> /HelloServlet </url-pattern>
>        </servlet-mapping>
>      <servlet>
>          <servlet-name> IntsServlet </servlet-name>
>          <servlet-class> IntsServlet </servlet-class>
>      </servlet>
>        <servlet-mapping>
>          <servlet-name> IntsServlet </servlet-name>
>          <url-pattern> /IntsServlet </url-pattern>
>        </servlet-mapping>
>
> </web-app>
> --------------------- end of file (not in xml)
>
> Now the file is 34 lines long and the 11th column is after the p> and is
> an end of line (same problem if it's a blank).  If I add or delete blank
> line, the
> line number on the error changes, so I have the problem file.
>
> I've been staring at it for 8 hours and don't see anything wrong, will some
> xml expert take a look and see what I'm doing wrong??
>
> Thanks
>
> Jim
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Ben Souther
F.W. Davison & Company, Inc.



REGISTER NOW FOR THE SCORPEO USER CONFERENCE!
September 18-19, 2003 in Boston/Brookline, MA
Additional Training Sessions held September 17, 2003
More info >> http://www.fwdco.com/services/Uconf03/default.shtm


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to