MR_HUPH
2016-07-09 17:18
我在做本节例子的时候把所有是imooc的地方都 替换成写成本公司的名字microBlue .运行结果报错为File "/microBlue-tag" not found。请问问题出在什么地方?
有个步骤老师应该是省略了吧,我不清楚
我是这样做的:
tld文件中:
<description>A tag library exercising SimpleTag handlers.</description>
<tlib-version>1.0</tlib-version>
<short-name>SimpleTagLibrary</short-name>
<uri>/tag</uri>
<tag>
<name>dateTag</name>
<tag-class>com.tag.DateTag</tag-class>
<body-content>empty</body-content>
</tag>
JSP页面中;
<%@ taglib prefix="simple" uri="/tag" %>
还有就是写完tld文件中需要右键Build Path,Add to Build Path,添加到类库中,这个步骤老师没有说到
运行就可以了
jsp里面 --->
<%@ taglib prefix="simple" uri="/simpletag" %>
tld里面 ---->
<description>JSTL 1.1 functions library</description>
<tlib-version>1.0</tlib-version>
<short-name>simple</short-name>
<uri>/simpletag</uri>
这样对应 就可以了吧,你试试
JSP自定义标签
27135 学习 · 40 问题