I have problem with custom tag
I have added in my web.xml :
<taglib>
<taglib-uri>counter</taglib-uri>
<taglib-location>/WEB-INF/counter.tld</taglib-location>
</taglib>

I also have the counter.tld :
<?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.2</jspversion>
<shortname>Counter Tag</shortname>
<info>This tag display Counter</info>
  <tag>
  <name>counter</name>
  <tagclass>CounterTag</tagclass>
  <bodycontent>empty</bodycontent>
 </tag>
</taglib>

but when i use in my code :
<%@ taglib uri="counter" prefix="util" %>
<html>
<head>
<title>Hit Counter with Custom Tag </title>
This page has visited for <util:counter/> times
</body>
</html>

I got this error messages :

org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 6 in the jsp file: /countertag.jsp
Generated servlet error:
C:\tomcat4\work\localhost\_\countertag$jsp.java:59: Class
org.apache.jsp.CounterTag not found.
                CounterTag _jspx_th_util_counter_0 = new CounterTag();
                ^
An error occurred at line: 6 in the jsp file: /countertag.jsp
Generated servlet error:
C:\tomcat4\work\localhost\_\countertag$jsp.java:59: Class
org.apache.jsp.CounterTag not found.
                CounterTag _jspx_th_util_counter_0 = new CounterTag();
                                                         ^
Why ?



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to