Quoting "D. Stimits" <[EMAIL PROTECTED]>:
Peter Crowther wrote:
From: D. Stimits [mailto:[EMAIL PROTECTED] 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.
This might be the case, but so far I've been unable to find any documentation about this as a feature of tomcat 5. Possibly it is just undocumented on the jakarta web site docs. The server.xml file itself isn't really XML, so there is no DTD to refer to either.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
