Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Wrong schema declarations in example webapps and default web.xml
tomcat 6.0.9?

Per Jonsson

2007-02-24

Replies:


I run java 6 on linux and is testing the tomcat 6.0.9 and discovered
that the schema declarations for the examples/managers etc and (maybe)
the default web.xml does not point to :
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd. The most of them
point to http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd (and the
default to version 2.4 iirc).

Maybe this is known, or reason for it?

I tried to turn on the xml-validation in server.xml and there was some
strange errors like not finding the <web-app> element. I didn't managed
to fix them in tomcat either. If I validate them in eclipse they work fine.

If i understand it correct the right declaration should be:

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  version="2.5">

/Per Jonsson

©2008 junlu.com - Jax Systems, LLC, U.S.A.