顯示找不到" 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