Bug 50790 - EL parser needs to be more dynamic
EL parser needs to be more dynamic
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Jasper
7.0.8
PC All
: P2 critical (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-02-15 15:04 UTC by Jason Porter
Modified: 2011-02-17 04:59 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Porter 2011-02-15 15:04:47 UTC
String.containes(CharSequence) is not being resolved correctly in the following situation:

<span class="#{(facesContext.externalContext.request.requestURI.contains(item.url)) ? 'activepage' : ''}">#{template[item.labelKey]}</span>

Exception:


javax.el.ELException: /faces/template/mainLayout.xhtml: java.lang.NoSuchMethodException: java.lang.String.contains(java.lang.String)
	at com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:87)
	at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:75)
	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:285)
	at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.encodeChildren(OutputLinkRenderer.java:125)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:848)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613)
	at com.sun.faces.facelets.component.RepeatRenderer.encodeChildren(RepeatRenderer.java:97)
	at com.sun.faces.facelets.component.UIRepeat.process(UIRepeat.java:496)
	at com.sun.faces.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:926)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613)
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:848)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:380)
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
	at com.ocpsoft.pretty.faces.application.PrettyViewHandler.renderView(PrettyViewHandler.java:157)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.reardeninc.tigris.ui.facesutil.FacesFilter.doFilter(FacesFilter.java:86)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:100)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoSuchMethodException: java.lang.String.contains(java.lang.String)
	at java.lang.Class.getMethod(Class.java:1605)
	at javax.el.BeanELResolver.invoke(BeanELResolver.java:405)
	at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:161)
	at org.apache.el.parser.AstValue.getValue(AstValue.java:159)
	at org.apache.el.parser.AstChoice.getValue(AstChoice.java:45)
	at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
	at com.sun.faces.facelets.el.ELText$ELTextVariable.toString(ELText.java:207)
	at com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:82)
	... 46 more
Comment 1 Mark Thomas 2011-02-17 04:59:55 UTC
Thanks for the report. This has been fixed in 7.0.x and will be included in 7.0.9 onwards.