pierred 00/11/20 15:49:08
Modified: jasper/src/share/org/apache/jasper/runtime
JspRuntimeLibrary.java
Log:
port larryi's bug fix in 3.2 to 4.0.
-----
Apply Gareth Morgan's patch for value="", but
don't allow setProperty with
param="..." to set the property if parameter is
empty.
Modify introspect() to allow introspecthelper() to
decide whether to set or not set the property since
it can tell if the property is an array or not.
Revision Changes Path
1.4 +4 -6
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
Index: JspRuntimeLibrary.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JspRuntimeLibrary.java 2000/11/14 22:06:22 1.3
+++ JspRuntimeLibrary.java 2000/11/20 23:49:08 1.4
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
1.3 2000/11/14 22:06:22 pierred Exp $
- * $Revision: 1.3 $
- * $Date: 2000/11/14 22:06:22 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
1.4 2000/11/20 23:49:08 pierred Exp $
+ * $Revision: 1.4 $
+ * $Date: 2000/11/20 23:49:08 $
*
* ====================================================================
*
@@ -157,8 +157,6 @@
while ( e.hasMoreElements() ) {
String name = (String) e.nextElement();
String value = request.getParameter(name);
- if (value == null || value.equals(""))
- continue;
introspecthelper(bean, name, value, request, name, true);
}
}
@@ -207,7 +205,7 @@
propertyEditorClass);
}
} else {
- if(value == null) return;
+ if(value == null || (param != null && value.equals(""))) return;
Object oval = convert(prop, value, type, propertyEditorClass);
if ( oval != null )
method.invoke(bean, new Object[] { oval });