- 论坛徽章:
- 0
|
没道理的,即使tld文件被打包了还是找得到的。难道一定要这样吗?
Typically, configuring a taglib is neither required nor recommended. The taglib is included in struts-core.jar, and the container will discover it automatically.
If, for some reason, a taglib configuration is needed within web.xml, extract the TLD file from the struts-core.jar META-INF folder, and add a taglib element to the web.xml.
<!-- ... -->
</welcome-file-list>
<taglib>
<taglib-uri>/s</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>
</web-app>
后来仔细一看,原来是我的库文件加错了,struts2中包含了struts-core-1.3.5.jar 和struts2-core-2.0.11.jar 。由于自己的疏忽加了前者。呵呵,struts2变成了struts 当然找不到标签!
google后发现有不少马大哈遇到类似的问题!仔细,仔细。否则事倍功半! |
|