[EMAIL PROTECTED] wrote:
I have defined one java function and want to refer it in my JSP application.
For doing this I have prepared a .tld file as
<?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" >
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>MY_Tags</shortname>
<uri>myfunc</uri>
<info>
Author: Shrinivas Joshi.
version 0.1
</info>
<function>
<name>replace</name>
<function-class>com.edu.function.eduFunction</function-class>
<function-signature>String replace( java.lang.String,
java.lang.String, java.lang.String )</function-signature>
</function>
</taglib>
Also I have defined the tag lib in web.xml file as
<taglib>
<taglib-uri>myfunc</taglib-uri>
<taglib-location>/WEB-INF/ttlfunction.tld</taglib-location>
</taglib>
However when I try to include the tag lib in my JSP pages using
<%@ taglib uri="myfunc" prefix="ttlfunc" %>
then Tomcat (4.1.12 ) is throwing below error:
org.apache.jasper.JasperException: XML parsing error on file
/WEB-INF/ttlfunction.tld: (line 20, col 11): Element type "function" must be
declared.
Can anybody help me out in this regards
Functions were added in the JSP 2.0 spec, so you need to use a JSP 2.0
TLD instead of a JSP 1.1 TLD. You must also use a web container that
supports JSP 2.0, such as Tomcat 5 instead of Tomcat 4.
Hans
--
Hans Bergsten <[EMAIL PROTECTED]>
Gefion Software <http://www.gefionsoftware.com/>
Author of O'Reilly's "JavaServer Pages", covering JSP 2.0 and JSTL 1.1
Details at <http://TheJSPBook.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]