https://issues.apache.org/bugzilla/show_bug.cgi?id=49217
Summary: Accepting java keyword in EL
Product: Tomcat 5
Version: 5.5.17
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: minor
Priority: P2
Component: Servlet & JSP API
AssignedTo: [email protected]
ReportedBy: [email protected]
According to EL, the Whatever comes to the right of the dot operator must
follow normal Java naming rules for identifiers. For example it must not be a
Java Key word (Here the example is shown for int, which is a Java key word).
// Java Bean
package library;
public class Book {
private String title;
public void setInt(String title) {
this.title = title;
}
public String getInt() {
return title;
}
}
// JSP
<%
library.Book book = new library.Book();
book.setInt("sample title");
request.setAttribute("book", book);
%>
${book.int}
//OUTPUT
sample title
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]