Hello,
First a method can return only one object or one primitive value.
In your case , seems you want to pass String value when the length is > 0 and true when the length is ==0 and want to perform toBoolean() on the object.
You can do in one of the following ways:
1) Make the method to give true or false depending on the string length. ( the whole purpose of the method gone).
2) Let it return one object which got Boolean() methods on return object.
3) Let the base class have two Boolean methods() and make the "name" as instance variable inspite of local variable and call the boolean method first in your jsp and depening upon the result call the getXXX() method.
try it until you get a way