Hi SuperMan,
This isn't really a Hibernate question, it's related to how you are getting the property from your object into your JSP.
It's probably due to the fact that the String.valueOf() method returns "null" if the object is null:
Code:
public static String valueOf(Object obj) {
return (obj == null) ? "null" : obj.toString();
}
You can change the getter method of your object so that it returns empty string if the value is null, instead of returning null and making the JSP renderer convert it to a string.
hope that helps,
D.
SuperMan2000 wrote:
I have this comment field in the database and if it is empty in the database I get the value "null" in my commnets fields which i dont want... we tried checking for nulls in the jsp but it doesnt work... and the null value still appears on the jsp.... how do i fix this