jsp:setProperty for empty Strings
Can anybody explain why setProperty on a String property has no effect if
the value passed in is an empty string. I can see the point if it is null
(does not exist). I can also see the point if the property is not a string
since there is no logical way to convert to a Boolean etc.
In order to keep data entered across web pages I have made a very simple
UI bean where everything is a string. This ensures that even if the user
enters invalid data it will not be thrown away.
This works fine if you want to enter string properties. It also works if
you want to modify them. It breaks down completely if you want to clear out
an optional property.
I know that this behaviour is as per the JSP spec but can anybody explain
why this behaviour would be desirable.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center