Hi All,
I am using eclipse to practice custom tag examples given in the HFSJ
in eclipse i created new project as apache
tomcat project and in WEB-INF folder i created a file named simple.tld with the following content
<?xml version = "1.0" encoding ="ISO-8859-1" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" version="2.0">
<tlib-version>1.2</tlib-version>
<uri>simpleTags</uri>
<tag>
<description>marginally better use of a custom tag</description>
<name>simple1</name>
<tag-class>foo.SimpleTagTest1</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
and usetag.jsp with the following content
package foo;
import java.io.IOException;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import javax.servlet.jsp.JspException;
public class SimpleTagTest1 extends SimpleTagSupport {
public void doTag() throws JspException, IOException {
getJspContext().getOut().print("This is the lamest use of a custom tag");
}
}
and SimpleTagTest1.java is placed in foo pacakge
but i am getting this error:
cvc-elt.1: cannot find the declaration of element 'taglib'
Can any body suggest me what is wrong?
Thanks & Regards,
Sudhakar Karnati
[ April 17, 2008: Message edited by: sudhakar karnati ]