標籤:地方 去掉 解決方案 菜單 技術 mave jsp頁面 1.2 blog
1. 問題
看到這個錯誤以為是貌似jsp頁面有誤,c:forTokens標籤用錯了??
An error occurred at line: 444 in the jsp file: /WEB-INF/pages/countOrder/viewCountOrderDetails.jspThe method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object)441: </tr>442: </thead>443: <tbody>444: <c:forTokens items="${carBizNumprizeBase.driverAwardCondition}" delims="-"445: var="driverAwardCondition" varStatus="status">
但是測試和預生產環境沒有出現該問題,是否環境有問題?
2. 解決方案
在網上看到有說jstl.jar衝突的,在項目lib中確實有jstl1.2.jar但是tomcat的lib庫及jdk的lib庫中均沒有改jar;
也看到說去掉standard.jar的,去掉了該包後點擊原來有問題的jsp,頁面出來了,但是旁邊的菜單等點不了了;
standard.jar與jstl.jar不衝突(百度裡又說jstl1.2以上不要standard)
最終在新的伺服器部署項目 好了(用的是standard1.1.2和jstl1.2.jar)。
回過頭看到,maven中央倉庫沒有standard1.2.3,後換成jstl1.1。
可能是環境多少有點問題 如與其他地方有不和諧, 但是沒按標準組合使用jar 可能也造成使用出現上述問題
The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object)