错误信息:
在webloigc下配置struts应用时经常会出现下面错误,而在其它web服务器下却没问题:
parsing of jsp file '/index.jsp' failed:
------------------------------------------------ -
/index.jsp(3): error in using tag library uri='/web-inf/struts-html.tld' prefix='html': the tag class 'org.apache.struts.taglib.html.formtag' has no setter method corresponding to tld declared attribute 'name', (jsp 1.1 spec, 5.4.1)
probably occurred due to an error in /index.jsp line 3:
<%@ taglib uri="/web-inf/struts-html.tld" prefix="html" %>
原因:
这是因为weblogic对tag的要求十分严格
解决方法:
打开struts.jar可以看到有org和meta-inf两个目录,在meta-inf目录下是验证用的tld文件,实际上我们只要把这个meta-inf目录删除即可。可以下载struts的源代码,然后重新生成新的jar文件,只包含java类文件,不要包含tld文件
新闻热点
疑难解答