錯誤信息:
在webloigc下配置struts應用時經(jīng)常會出現(xiàn)下面錯誤,而在其它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文件
新聞熱點
疑難解答
圖片精選