larryi      00/11/20 16:47:16

  Modified:    src/share/org/apache/jasper/runtime JspRuntimeLibrary.java
  Log:
  Make setProperty with param="..." not set the property if the 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.7       +4 -6      
jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
  
  Index: JspRuntimeLibrary.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JspRuntimeLibrary.java    2000/11/15 14:53:07     1.6
  +++ JspRuntimeLibrary.java    2000/11/21 00:47:15     1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v 
1.6 2000/11/15 14:53:07 larryi Exp $
  - * $Revision: 1.6 $
  - * $Date: 2000/11/15 14:53:07 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v 
1.7 2000/11/21 00:47:15 larryi Exp $
  + * $Revision: 1.7 $
  + * $Date: 2000/11/21 00:47:15 $
    *
    * ====================================================================
    * 
  @@ -149,8 +149,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);
        }
       }
  @@ -196,7 +194,7 @@
                        createTypedArray (bean, method, values, t); 
                    }
                } else {
  -                 if(value == null) return;
  +                 if(value == null || (param != null && value.equals(""))) return;
                    Object oval = convert(value, type);
                    if ( oval != null )
                        method.invoke(bean, new Object[] { oval });
  
  
  

Reply via email to