You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Phil404 <ph...@unity-software.com> on 2007/11/13 21:50:57 UTC
JasperException and javax.el.ELException when running under Jetty
I have a struts 2 application which works perfectly on Tomcat 5.5.23 but when
I run it on Jetty 6.1.1 I get the following exception when processing an
OGNL expressions in a jsp page:
org.apache.jasper.JasperException: /WEB-INF/pages/register/info.jsp(45,10)
PWC6038: "#{'FRESHMAN':'Freshman', 'SOPHOMORE':'Sophomore',
'JUNIOR':'Junior', 'SENIOR':'Senior'}" contains invalid expression(s):
javax.el.ELException: Error Parsing: #{'FRESHMAN':'Freshman',
'SOPHOMORE':'Sophomore', 'JUNIOR':'Junior', 'SENIOR':'Senior'}
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:49)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:344)
To me it looks like the JSP processor is trying to parse this expression
which it should not be. Can anyone please shed any light on this issue?
Phil
I'm using the maven-jetty-plugin and with the command mvn jetty:run-war
--
View this message in context: http://www.nabble.com/JasperException-and-javax.el.ELException-when-running-under-Jetty-tf4800540.html#a13734373
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JasperException and javax.el.ELException when running under
Jetty
Posted by Phil404 <ph...@unity-software.com>.
Wes
Thanks for your quick response. You gave me the clue I needed!. OK, so I
had this statements in my jsp:
<td><ww:radio theme="simple" name="responses[%{questionNo}].value"
list="%{#{5:''}}" /></td>
which produced the following error message:
org.apache.jasper.JasperException:
/WEB-INF/pages/assessment/questions.jsp(33,20) PWC6038: "%{#{5:''}}"
contains invalid expression(s): javax.el.ELException: Error Parsing:
%{#{5:''}}
I escaped the #{ as follows:
<td><ww:radio theme="simple" name="responses[%{questionNo}].value"
list="%{\#{5:''}}" /></td>
but that gave me the error:
tag 'radio', field 'list', name 'responses[1].value': The requested list key
'%{\#{5:''}}' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]
so I changed it to this:
<td><ww:radio theme="simple" name="responses[%{questionNo}].value"
list="%{\#@java.util.HashMap@{5:''}}" /></td>
and that gave me:
tag 'radio', field 'list', name 'responses[1].value': The requested list key
'%{\#@java.util.HashMap@{5:''}}' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]
so another change:
<td><ww:radio theme="simple" name="responses[%{questionNo}].value"
list="\#@java.util.HashMap@{5:''}" /></td>
which still gives me:
tag 'radio', field 'list', name 'responses[1].value': The requested list key
'\#@java.util.HashMap@{5:''}' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]
so yet another change:
<td><ww:radio theme="simple" name="responses[%{questionNo}].value"
list="%{#@java.util.HashMap@{5:''}}" /></td>
which worked as does:
<td><ww:radio theme="simple" name="responses[%{questionNo}].value"
list="#@java.util.HashMap@{5:''}" /></td>
which also works. Just to amke sure, I checked that the last change is
backward compatible with Tomcat 5.5.23 (and therefore JSP 2.0).
Phil
--
View this message in context: http://www.nabble.com/JasperException-and-javax.el.ELException-when-running-under-Jetty-tf4800540.html#a13737642
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JasperException and javax.el.ELException when running under Jetty
Posted by Wes Wannemacher <we...@wantii.com>.
Although the bug summary may be misleading, I'm guessing it's related to -
https://issues.apache.org/struts/browse/WW-2213
Basically, Jetty is treating your anonymous map as UEL, when it's
OGNL. You can escape the # like so -
\#{'FRESHMAN':'Freshman', 'SOPHOMORE':'Sophomore', 'JUNIOR':'Junior',
'SENIOR':'Senior'}
On 11/13/07, Phil404 <ph...@unity-software.com> wrote:
>
> I have a struts 2 application which works perfectly on Tomcat 5.5.23 but when
> I run it on Jetty 6.1.1 I get the following exception when processing an
> OGNL expressions in a jsp page:
>
> org.apache.jasper.JasperException: /WEB-INF/pages/register/info.jsp(45,10)
> PWC6038: "#{'FRESHMAN':'Freshman', 'SOPHOMORE':'Sophomore',
> 'JUNIOR':'Junior', 'SENIOR':'Senior'}" contains invalid expression(s):
> javax.el.ELException: Error Parsing: #{'FRESHMAN':'Freshman',
> 'SOPHOMORE':'Sophomore', 'JUNIOR':'Junior', 'SENIOR':'Senior'}
> at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:49)
> at
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:344)
>
> To me it looks like the JSP processor is trying to parse this expression
> which it should not be. Can anyone please shed any light on this issue?
>
> Phil
>
> I'm using the maven-jetty-plugin and with the command mvn jetty:run-war
> --
> View this message in context: http://www.nabble.com/JasperException-and-javax.el.ELException-when-running-under-Jetty-tf4800540.html#a13734373
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org