解决taglib在servlet2.4,jsp2.0下写入web.xml的问题
注意:如果所建项目是servlet2.4的,那么在web.xml中写taglib就要加一个 <jsp-config>标记,如下所示: <?xml version="1.0" encoding="UTF-8"?> <welcome-file-list> </web-app>
<web-app id="WebApp_ID" version="2.4" 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 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
TagStudy2
</display-name>
<jsp-config>
<taglib>
<taglib-uri>/hello</taglib-uri>
<taglib-location>/WEB-INF/HelloTag.tld</taglib-location>
</taglib>
</jsp-config>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
没有评论:
发表评论