Hi Everyone,

I came across na interesting situation here. One of my classes contains a 
Boolean (wrapper) value as its return type. Something like this:

...
public Boolean isServerOK() {
        return isOK;
}
...

Whenever I try to invoke this method using EL, I receive the following error: 
"Property serverOK not found onm type package.path.MyClass". On the other hand, 
if I change this method return type to boolean (primitive), I can run it 
correctely.

Looking in Expression Languange Specification published at 
https://jsp.dev.java.net/spec/jsp-2_1-fr-spec-el.pdf , I could find the 
following item:

1.18.5
        Coerce A to Boolean
                ■ If A is null or "", return false
                ■ Otherwise, if A is a Boolean, return A
                ■ Otherwise, if A is a String, and Boolean.valueOf(A) does not 
throw an
exception, return it 


My question is: Should I be able to use Boolean (wrapper) as a boolean 
(primitive) yes or no?

Thanks a lot!

Marcus Milanez

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to