Bug 50272 - Usage of variables named as java keyword leads to .jsp/.tag compilation error
Summary: Usage of variables named as java keyword leads to .jsp/.tag compilation error
Status: RESOLVED DUPLICATE of bug 50120
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 7.0.4
Hardware: PC All
: P2 regression (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-15 05:07 UTC by Eugene Petrenko
Modified: 2010-11-15 07:48 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Petrenko 2010-11-15 05:07:53 UTC
Consider .jsp file source with failure: 

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

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 ***