My
tomcat server can't load my .class file. I get a JasperException saying unable to load com.j2ee.ExampleTag. I have placed this file where other classes are stored (C:\TOMCAT\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes\) Can anybody help me to figure this out.
Here are my files
mytag-taglib.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>mytag</shortname>
<uri></uri>
<info>
A simple tab library for the examples
</info>
<tag>
<name>example</name>
<tagclass>com.j2ee.ExampleTag</tagclass>
<info> Display JSP sources </info>
</tag>
</taglib>
ExampleTag class
----------------
package com.j2ee;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;
public class ExampleTag extends TagSupport
{
public int doStartTag()
{
try
{
JspWriter out = pageContext.getOut();
out.println("My first Tag Example");
}
catch(IOException e)
{
System.out.println("error in ExampleTag: "+ e);
}
return(SKIP_BODY);
}
}
My jsp file
-----------
<HTML>
<HEAD>
<%@ taglib uri="mytag-taglib.tld" prefix="mytag" %>
<TITLE><mytag:example /></TITLE>
</HEAD>
<BODY>
<H1><mytag:example /></H1>
<mytag:example />
</BODY>
</HTML>
Thanks,