解决<%@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下面,亲测解决

原文地址:https://www.cnblogs.com/zst-blogs/p/11340911.html