tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <>
Subject Re: How to locate tld file wihin parse error?
Date Tue, 20 Jul 2004 11:39:05 GMT
I usually try to do this sort of validation with Ant during a build. Something
like this:

<property name="j2ee.home" location="C:/j2sdkee1.3.1"/>

<property name="taglib.dtd" value="web-jsptaglibrary_1_2.dtd"/>
<property name="taglib.dtd.publicId"
          value="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"/>

<xmlcatalog id="dtd">
  <dtd publicId="${taglib.dtd.publicId}"


<target name="xmlvalidate" depends="build">
  <xmlvalidate lenient="false" warn="true">
    <xmlcatalog refid="dtd"/>
    <fileset dir="${build.dir}/META-INF">
      <include name="*.tld"/>

<target name="dist" depends="xmlvalidate">
  <jar jarfile="${dist.dir}/${}.jar" basedir="${build.dir}"/>

Quoting Soledad Tabuenca <>:

> Hi!
> When I startup tomcat, I obtain the attached typical
> parsing error because the tags are not in a suitable
> order within a tld file. 
> My question is, is there a way to know which is the
> tld file that contains this parse error?
> In server.xml, I have set the xmlvalidation = "true",
> debugs to a high level and log files (catalina.out,
> log_...) just show the line and column of the error
> but not the name of the file.
> I have more than 20 tld files, and I would like to
> know if there is a better way to find it than
> searching file to file....
> Thanks
> SEVERE: Parse Error at line 20 column 11: The content
> of element type "tag" must match
> org.xml.sax.SAXParseException: The content of element
> type "tag" must match

Kris Schneider <>
D.O.Tech       <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message