Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Delivered-To: moderator for tomcat-dev@jakarta.apache.org Received: (qmail 54654 invoked from network); 18 Jul 2000 20:44:48 -0000 Received: from everest1.fastlane.net (HELO catbert.eversoft.com) (209.197.212.42) by locus.apache.org with SMTP; 18 Jul 2000 20:44:48 -0000 Received: from SMTP (phil.eversoft.com [192.168.1.101]) by catbert.eversoft.com (8.9.3/8.9.3) with SMTP id PAA23152 for ; Tue, 18 Jul 2000 15:46:46 -0500 Received: from haraburda.com ([192.168.1.36]) by 192.168.1.101 (Norton AntiVirus for Internet Email Gateways 1.0) ; Tue, 18 Jul 2000 20:50:38 0000 (GMT) Sender: david@catbert.eversoft.com Message-ID: <3974C139.1F25CC41@haraburda.com> Date: Tue, 18 Jul 2000 15:42:33 -0500 From: David Haraburda X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.15 i686) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Problem with jsp:setProperty and blank strings Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hello, I am having problems using the jsp:setProperty tag when I want to set a parameter to a blank string. It doesn't work. I have traced this back to org.apache.jasper.runtime.JspRuntimeLibrary. For example, if I have the following line of JSP: where myBean is a bean that I have instantiated with jsp:useBean, and myProp is a String on myBean, with the appropriate getter and setter methods. I am collecting the values from a form, so I have also tested: and I don't know if this is a bug or a feature, but in JspRuntimeLibrary.java, on line 152 in the introspect method you check to see if the value is null OR an empty string. If it is, you skip calling introspecthelper which would call the appropriate setter method. Additionally, in introspecthelper, on line 200 of the same file there is the same check. Changing these to check only for null seems to fix the problem. Is this a bug? If it is, I would be more than happy to submit a patch (although the changes are trivial). If not, why is setup to behave like this, and what can I do to get the behavior I want? Thanks for your time, David -- David Haraburda - dharaburda@infoserver.com Outsourcing Center - Providing Insight Into Outsourcing 972-980-0013 x736