tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <Larry.Isa...@sas.com>
Subject RE: body content not allowed
Date Fri, 16 Jun 2000 14:59:12 GMT
Hi,

I had trouble with this in the past.  Fortunately, the solution is simple.  The DTD for taglib's
specifies for <tag>:

<!ELEMENT tag (name, tagclass, teiclass?, bodycontent?, info?, attribute*) >
	<!ATTLIST tag id ID #IMPLIED >

The presence of the parenthesis means that the enclosed items must appear in the specified
order.  Thus, the XML parser is complaining that you have <bodycontent> after <info>,
instead of before.

Larry

-----Original Message-----
From: Adam Paeth [mailto:apaeth@fortdearborn.com]
Sent: Friday, June 16, 2000 10:37 AM
To: Tomcat User List
Subject: body content not allowed


After a painful creating/configuration of my first tag library I've come up
with a new problem...

I have the following tag library

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
        "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

<!-- a tag library descriptor -->

<taglib>
  <!-- after this the default space is
        "http://java.sun.com/j2ee/dtds/jsptaglibrary_1_2.dtd"
   -->

  <tlibversion>1.0</tlibversion>
  <jspversion>1.1</jspversion>
  <shortname>page_test</shortname>
  <uri></uri>
  <info>
        tag library for testing
  </info>

  <tag>
    <name>ptest</name>
    <tagclass>page_test</tagclass>
    <info>test tag </info>
    <bodycontent>JSP</bodycontent>
  </tag>
</taglib>

whenever I try to run the page with tags <prefix:ptest> some content
</prefix:ptest> (prefix being the assigned prefix) I get the following error

org.apache.jasper.JasperException: Unable to open taglibrary ads-taglib.tld
: Parse Error in the tag library descriptor: Element "tag" does not allow
"bodycontent" here.

I've read through a few sample applications, searched the web, and it looks
like this should work.  Does anyone have any idea what could be wrong?

Adam Paeth / apaeth@fortdearborn.com
Advanced Technology Group
Fort Dearborn Company
1530 Morse Ave.
Elk Grove Village, IL 60007
847-427-5494 voice
847-357-8726 fax


--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message