自定义的标签怎么会出现如下的错误呢?
java文件:
package esystem.eshop;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class helloWorld extends TagSupport{
private PageContext pageContext;
private Tag parent;
public int doStartTag() throws
javax.servlet.jsp.JspException{
return SKIP_BODY;
}
public int doEndTag() throws javax.servlet.jsp.
JspException{
try{
pageContext.getOut().print( "Hello World! ");
}catch(
java.io.IOException e){
throw new JspException( "IO Error: "+e.getMessage());
}
return SKIP_PAGE;
}
public void release(){}
}
描述文件:app.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.1 </jspversion>
<shortname> Application Tag Library </shortname>
<uri> http://jakarta.apache.org/taglibs/struts-example-1.0 </uri>
<info>
</info>
<tag>
<name> helloWorld </name>
<tagclass> esystem.eshop.helloWorld </tagclass>
<bodycontent> empty </bodycontent>
<info>
</info>
</tag>
</taglib>
web.xml文件:
<taglib>
<taglib-uri> /tags/helloWorld </taglib-uri>
<taglib-location> /WEB-INF/app.tld </taglib-location>