You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "J. W. Ballantine" <jw...@homer.att.com> on 2003/07/03 14:53:01 UTC

Re: web.xml help

Thanks,

Is there some place on the web that has this and like info?  I've
been scanning the xml tutorials and either missed it or they don't
go into the amount of depth.



----------  In Response to your message -------------

>  Date:  Thu, 3 Jul 2003 08:25:58 -0400
>  To:  "Tomcat Users List" <to...@jakarta.apache.org>
>  From:  Ben Souther <bs...@fwdco.com>
>  Subject:  Re: web.xml help
>
>  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-m
a
>  >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 som
e
>  > xml expert take a look and see what I'm doing wrong??
>  >
>  > Thanks
>  >
>  > Jim
>  >
>  >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>  
>  -- 
>  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: tomcat-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>  



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: web.xml help

Posted by Ben Souther <bs...@fwdco.com>.
I found out by searching this list.  I haven't looked at the docs that ship 
with Tomcat in a while so I don't know if they're in there.  It might be a 
good idea to note this in the xml comments in the web.xml file that ships 
with Tomcat.





On Thursday 03 July 2003 08:53 am, J. W. Ballantine wrote:
> Thanks,
>
> Is there some place on the web that has this and like info?  I've
> been scanning the xml tutorials and either missed it or they don't
> go into the amount of depth.
>
>
>
> ----------  In Response to your message -------------
>
> >  Date:  Thu, 3 Jul 2003 08:25:58 -0400
> >  To:  "Tomcat Users List" <to...@jakarta.apache.org>
> >  From:  Ben Souther <bs...@fwdco.com>
> >  Subject:  Re: web.xml help
> >
> >  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*,ses
> >  >sion
>
> -
>
> >  >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*,filte
> >  >r*,
> >  > filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mi
> >  >me-m
>
> a
>
> >  >ppin
> >  > g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-r
> >  >ef*,
>
> s
>
> >  >ecur
> >  > ity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-l
> >  >ocal
>
> -
>
> >  >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
> >  > som
>
> e
>
> >  > xml expert take a look and see what I'm doing wrong??
> >  >
> >  > Thanks
> >  >
> >  > Jim
> >  >
> >  >
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >  > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >  --
> >  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: tomcat-user-unsubscribe@jakarta.apache.org
> >  For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

-- 
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: web.xml help

Posted by Tim Funk <fu...@joedog.org>.
1) Its part of the Servlet API. - Not tomcat dependent
2) If you create an XML document that references a DTD - always verify your 
doc is valid against the DTD.

-Tim

J. W. Ballantine wrote:
> Thanks,
> 
> Is there some place on the web that has this and like info?  I've
> been scanning the xml tutorials and either missed it or they don't
> go into the amount of depth.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org