tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: web.xml uses non-validating xml?
Date Tue, 28 Dec 2004 23:38:40 GMT
Quoting "D. Stimits" <stimits@comcast.net>:

> Peter Crowther wrote:
> >>From: D. Stimits [mailto:stimits@comcast.net]
> >>I'm trying to debug something, and the individual
> >>webapps/myapp/WEB-INF/web.xml file seems to be a bit of an
> >>enigma to me.
> >
> > [...]
> >
> >>I went to the DTD's to see what was
> >>written there. Initially I used this DTD:
> >><!DOCTYPE web-app
> >>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> >>  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> >>
> >>...shock and surprise...resource-env-ref is not even in the
> >>DTD.
> >
> > [...]
> >
> >>Incidentally, this tag is properly described in
> >>http://java.sun.com/dtd/web-app_2_3.dtd.
> >
> >
> > Which version of Tomcat are you using, and how did you choose the DTD
> > against which to validate?  Different versions implement different
> > revisions of the servlet spec, and it's very likely that you're using a
> > sufficiently recent version of Tomcat that the 2.3 or 2.4 specs are
> > implemented.
>
> Tomcat is version 5.0.30, originally I just copied from a blank struts
> app set of files, which used the 2.2 DTD.
>
> Regardless of which DTD's tomcat supports under 5.0, it seems to be a
> bug that it ignores the stated DTD and gives no error or warning that a
> tag is being used that the DTD does not know anything about. Now if a
> DTD version stated in the web.xml file is not supported by tomcat, I'd
> expect an error be generated there as well.
>

I think you have to set validating to true in server.xml.  Otherwise, the file
is parsed in a non-validating fashion.  Sorry, don't remember exactly where you
set this, but I do seem to recall something like this.  It's probably on the
<Host> tag, but I'm not sure.  Check the docs.

Jake



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


Mime
View raw message