following is the sample of 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-jsptaglib_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>mut</shortname>
<uri> </uri>
<info>
RSExplorer
java server pages
</info>
<tag>
<name>HelloWorldTag</name>
<tagclass>HelloWorldTag</tagclass>
<bodycontent>empty</bodycontent>
</tag>
</taglib>
jsp page using tag lib is
<html>
<head>taglib
test</head>
<body>
<%@taglib uri="taglib.tld" prefix="ttag" %>
<ttag:HelloWorldTag>
</ttag:HelloWorldTag>
</body>
<html>
i have placed the jsp page and taglib.tld in same director
java code for the handler class is
import java.io.IOException;
import java.io.PrintStream;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;
public class HelloWorldTag extends TagSupport{
public int doStartTag() throws JspException{
try{
JspWriter out = pageContext.getOut();
out.print("Hello Old Boy");
out.print("It seems that you r on right track");
}catch(IOException e){ }
return SKIP_BODY;
}
}
now when i try to access the page i am getting following error:
org.apache.jasper.JasperException: Unable to open taglibrary taglib.tld : Unable to open the tag library descriptor: Stream closed.
can anybody help please