簡體   English   中英

在netbeans中顯示struts2 select錯誤

[英]showing error for struts2 select in netbeans

當我在Netbeans IDE中使用以下代碼時,我在Netbeans中得到錯誤指示。 但是代碼工作正常。 誰能告訴我為什么我在Netbeans中收到錯誤警告。 有什么解決辦法嗎

錯誤警告在list="#{'01':'Jan', '02':'Feb'}"

<s:select label="Months"
       name="months"
       headerKey="-1" headerValue="Select Month"
       list="#{'01':'Jan', '02':'Feb'}"
       value="selectedMonth"
       required="true"
/>

錯誤指示消息如下

Encountered ":" at line 1, column 7.
Was expecting one of:
    "}" ...
    "." ...
    "[" ...
    ">" ...
    "gt" ...
    "<" .....

Netbeans 7使用的JSP EL 2.1現在使用#字符。

目前可能最簡單的解決方案是添加地圖的類:

#@java.util.LinkedHashMap@{ "foo" : "foo value", "bar" : "bar value" } 

查看答案: 答案

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM