在使用struts2框架的ONGL表達式寫前臺頁面時,需要使用<s:set>標籤在request作用域中定義一個list集合,但當時使用的語法爲:
<s:set name = "list" scope = "request" value ="{'item1','item2','item3'}" />
此時頁面報錯,且啓動Tomcat時,報錯。報錯信息如下:
According to the TLD or the tag file, attribute var is mandatory for tag set
此時將 name換成var則正常。
注:後續是否有問題,還正在測試中,若有問題,再進行補充。