From: markt Date: Fri, 26 Dec 2008 23:43:09 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46381 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ed12a4f405d27d0054344ce06ae32b74fa25152f;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46381 Needs testign with the TCK before proposing for 6.0.x git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@729569 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index 201e1cc8f..49dd047ee 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -836,6 +836,7 @@ class Generator { private String attributeValueWithEL(boolean isTag, String tx, Class expectedType, String mapName) { if (tx==null) return null; + Class type = expectedType; int size = tx.length(); StringBuffer output = new StringBuffer(size); boolean el = false; @@ -851,6 +852,8 @@ class Generator { if (mark < i) { if (output.length() > 0) { output.append(" + "); + // Composite expression - must coerce to String + type = String.class; } output.append(quote(tx.substring(mark, i))); } @@ -865,10 +868,12 @@ class Generator { // End of an EL expression if (output.length() > 0) { output.append(" + "); + // Composite expression - must coerce to String + type = String.class; } output.append( JspUtil.interpreterCall(isTag, - tx.substring(mark, i+1), expectedType, + tx.substring(mark, i+1), type, mapName, false)); mark = i + 1; el = false;