You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Ray Racine <rr...@adelphia.net> on 1999/11/21 23:24:40 UTC

Hmmm....

Gentleman, ladies:

I just started playing with Jakarta and Jsp and noted the following:

A bean with a boolean property.

class BooleanTest {
    boolean abool;

    void setAboolean(boolean b) {
        abool = b;
    }

}


<jsp:useBean id="bool" class="BooleanTest" scope="session"/>
<jsp:setProperty name="bool" property="abool" value="true"/>

The generated code contains the following line:

bool.setAbool(Boolean.getBoolean("true"));

This does not work.  (Check Java 1.2 API)

I would have expected:

bool.setAbool(Boolean.valueOf("true"));

Is there a bug here ....


Regards,

Ray Racine




Re: Hmmm....

Posted by Glenn Vanderburg <gv...@delphis.com>.
Ray Racine <rr...@adelphia.net> writes:
>
> <jsp:setProperty name="bool" property="abool" value="true"/>
> 
> The generated code contains the following line:
> 
> bool.setAbool(Boolean.getBoolean("true"));

Yikes!

> Is there a bug here ....

Definitely.  (That goofy method has bitten me, too.)

-- 
Glenn Vanderburg
Delphi Consultants, LLC
glv@delphis.com