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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JasperException and javax.el.ELException when running under Jetty
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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wesley Wannemacher President, Head Engineer/Consultant WanTii, Inc. http://www.wantii.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JasperException and javax.el.ELException when running under Jetty
Wes Thanks for your quick response. You gave me the clue I needed!. OK, so I had this statements in my jsp: tdww: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: tdww: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: tdww:radio theme=simple name=responses[%{questionNo}].value list=[EMAIL PROTECTED]@{5:''}} //td and that gave me: tag 'radio', field 'list', name 'responses[1].value': The requested list key '[EMAIL PROTECTED]@{5:''}}' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] so another change: tdww:radio theme=simple name=responses[%{questionNo}].value list=[EMAIL PROTECTED]@{5:''} //td which still gives me: tag 'radio', field 'list', name 'responses[1].value': The requested list key '[EMAIL PROTECTED]@{5:''}' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] so yet another change: tdww:radio theme=simple name=responses[%{questionNo}].value list=[EMAIL PROTECTED]@{5:''}} //td which worked as does: tdww:radio theme=simple name=responses[%{questionNo}].value list=[EMAIL PROTECTED]@{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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]