Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Custom Tag  RSS feed

 
m asif
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need your help!
I am getting following error in jbuilder.
PARSE error at line 22 column 13
org.xml.sax.SAXParseException: The content of element type "tag" must match "(name,tagclass,teiclass?,bodycontent?,info?,attribute*)".
StandardWrapper[ efault]: Loading container servlet default
StandardWrapper[:invoker]: Loading container servlet invoker
StandardContext[]: Servlet threw load() exception: javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception

Here is .tld file:
<?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>csajsp</shortname>
<info>
A tag library from Core Servlets and JavaServer Pages,
http://www.coreservlets.com/.
</info>
<tag>
<name>example</name>
<tagclass>coreservlets.tags.ExampleTag</tagclass>
<info>Simplest example: inserts one line of output</info>
<bodycontent>EMPTY</bodycontent>
</tag>
<!-- Other tags defined later... -->
</taglib>
 
Brian R. Wainwright
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
I believe <bodycontent> must come BEFORE <info> In your first tag declaration, you have info first.
--BW
[ November 24, 2003: Message edited by: Brian R. Wainwright ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!