private static final String VAR_INSTANCEMANAGER =
System.getProperty("org.apache.jasper.compiler.Generator.VAR_INSTANCEMANAGER", "_jsp_instancemanager");
+ /* System property that controls if the requirement to have the object
+ * used in jsp:getProperty action to be previously "introduced"
+ * to the JSP processor (see JSP.5.3) is enforced.
+ */
+ private static final boolean STRICT_GET_PROPERTY = Boolean.valueOf(
+ System.getProperty(
+ "org.apache.jasper.compiler.Generator.STRICT_GET_PROPERTY",
+ "true")).booleanValue();
+
private ServletWriter out;
private ArrayList<GenBuffer> methodsBuffered;
+ ")_jspx_page_context.findAttribute("
+ "\""
+ name + "\"))." + methodName + "())));");
- } else if (varInfoNames.contains(name)) {
+ } else if (!STRICT_GET_PROPERTY || varInfoNames.contains(name)) {
// The object is a custom action with an associated
// VariableInfo entry for this name.
// Get the class name and then introspect at runtime.
be used.</p>
</property>
+ <property name="org.apache.jasper.compiler. Generator.STRICT_GET_PROPERTY">
+ <p>If <code>true</code>, the requirement to have the object referenced in
+ <code>jsp:getProperty</code> action to be previously "introduced"
+ to the JSP processor, as specified in the chapter JSP.5.3 of JSP 2.0 and
+ later specifications, is enforced. If not specified, the specification
+ compliant default of <code>true</code> will be used.</p>
+ </property>
+
<property name="org.apache.jasper.compiler. Parser.STRICT_QUOTE_ESCAPING">
<p>If <code>false</code> the requirements for escaping quotes in JSP
attributes will be relaxed so that an unescaped quote will not