Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

OGNL - invalid syntax. JSP EL?

Piero Sartini

2007-03-13

Replies:

Hello,

I get the following error when trying to create a list with ognl:

org.apache.jasper.JasperException: /jspx/users/completeProfile.jspx(27,48) "#{'F':'Female','M':'Male'}"
contains invalid expression(s): javax.el.ELException: Error Parsing:
#{'F':'Female','M':'Male'}

the code in jspx:
            <s:select label="%{getText('profile.gender')}"
                   name="gender"
                   headerKey="-1"
headerValue="%{getText('profile.selectgender')}"
                   list="#{'F':'Female','M':'Male'}"
                   value="gender"
                   required="true"/>

It seems it thinks it is JSP EL (what makes sense in a jsp file). I am using
JSP 2.1 - is this a problem for s2?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.