Jan 09 2008

resin 3.1 里面 ognl list 问题

Category: 技术ssmax @ 10:58:45

I use <s:select /> tag and find it doen’t work under resin 3.1.x;but it works well under tomcat 5.5.x and tomcat 6.0.x. The sample from struts-2.0.9\docs\docs\select.html, please try the code below under resin 3.1.x:

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

it fails.

#{} won’t be working in the future , see

http://java.sun.com/products/jsp/reference/techart/unifiedEL.html

use the alternative OGNL map syntax:

list=”#@java.util.HashMap@{‘Jan’:’01’, ‘Feb’:’02’, ‘Mar’:’03’}”

http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/collectionConstruction.html#mapConstruction

所有tag里面自定义的list都要新的方式,要不resin新版就显示不了的了

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.