Bug 50272

Summary: Usage of variables named as java keyword leads to .jsp/.tag compilation error
Product: Tomcat 7 Reporter: Eugene Petrenko <eugene.petrenko>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Severity: regression    
Priority: P2    
Version: 7.0.4   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Eugene Petrenko 2010-11-15 05:07:53 UTC
Consider .jsp file source with failure: 

<c:set var="class" value="foo" />

Another case:
I have a bean with getter: boolean isNew() available in jsp under name foo. 
The following .jsp crashes:
<c:if test="${foo.new}">AAA</c:if>

The same issues are found in .tag files. 
I included c prefix taglib with 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

Is there a workaround to add a prefix for all variable names in generated java code in order to make my application working with Tomcat7 without changes? My application works under Tomcat6.
Comment 1 Mark Thomas 2010-11-15 07:48:44 UTC
The EL spec does not permit the examples you quote.

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