The reason you "System.out.print(foo.getBar())" printed "null" is because that is how the print method is written. If the returned value of the method is actually <code>null</code> then the "print" method prints the value "null".

Long story short, what you are seeing is result of calling "System.out.print" not the result of the returned property value.

Kapisch(sic?)?

Marcelo Epstein wrote:

Hi,

When I use <bean:write ...> if the value is null, the tag returns "".
But, when I try, for example, System.out.print(xxx.getProperty()) inside an Action and the property is null. It returns the String "null". What is the best practice to avoid printing "null" ? I have to check all values before printing? Is there a better way to do that?


Thanks in advance,
Marcelo


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to