显示找不到" type="hidden"/>

解决<%@taglib prefix="s" uri="/struts-tags"%>显示找不到


问题:

jsp中使用<%@taglib prefix="s" uri="/struts-tags"%>显示找不到

 

解决方法:

在web.xml中插入标签属性:

        <taglib>
           <taglib-uri>/struts-tags</taglib-uri>
           <taglib-location>WEB-INF/struts-tags.tld</taglib-location>
        </taglib>

对于servlet2.3版本,插入在<web-app></web-app>中即可;

对于servlet2.4版本,需插入在<jsp-config></jsp-config>中,其中jsp-config可以是web-app中的标签

 

若上述步骤还是不能解决当前问题,则把struts2-corejar包中的/META-INF/struts-tags.tld的内容拷贝出来,放在自己的WEB-INF下面,亲测解决


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM