Bug 46596

Summary: Jasper comiler can't handle whitespace in expressions
Product: Tomcat 6 Reporter: Bram de Kruijff <Bram.deKruijff>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: regression    
Priority: P2    
Version: 6.0.18   
Target Milestone: default   
Hardware: PC   
OS: Windows XP   

Description Bram de Kruijff 2009-01-24 14:36:45 UTC
Below two simple testcases. Both work in TC 5.5.25 but the second fails on TC 6.0.18. The problem is in the whitespace between the functionname and the (.

<%@ page language="java" session="false" buffer="none"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="hw" 
    value="${fn:toLowerCase('HELLO WORLD')}" />
${hw}


<%@ page language="java" session="false" buffer="none"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="hw"
    value="${fn:toLowerCase
        ('HELLO WORLD')}" />
${hw}


Stacktrace:

WARNING: Unable to process request /web/admin/log
org.apache.jasper.JasperException: /WEB-INF/wm/admin/log.jsp(4,0) "${fn:toLowerCase
    ('HELLO WORLD')}" contains invalid expression(s): javax.el.ELException: Error Parsing: ${fn:toLowerCase
    ('HELLO WORLD')}
        at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
        at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
        at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
        at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1151)
        at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:821)
        at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
Comment 1 Mark Thomas 2009-01-31 02:35:57 UTC

*** This bug has been marked as a duplicate of bug 45511 ***