While using following tag:
<form:textarea path="message" cols="20" rows="5" placeholder="${message}"/>
I realized that if "message" can't be resolved and is therefore empty it seems that spring removes the placeholder attribute completly instead of setting it to placeholder="" or something.
Is this a known behaviour of spring form tags? Or do I miss something special here?
I realized that if "message" can't be resolved and is therefore empty it seems that spring removes the placeholder attribute completly instead of setting it to placeholder="" or something.
I think that was the expected behaviour of HTML. It has nothing to do with spring.
Try replacing place holder with empty in HTML page to observe the same behaviour. You can try here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.