I am using spring mvc and in my jsp page I have a form with textarea.
I want the textarea to be pre filled with some text (it is an edit feature for article).
I tried the following.
<form:textarea id="description" path="article.description" value="${article.description}" onKeyUp="validationmethod($(this));" onKeyDown="validationmethod($(this));" />
But my textarea is still empty..
the value=""
attribute works perfectly fine for <form:input>
but not for text area.
if i try to put it betweeen the tag then i get the warning "Form:textarea must not be empty".
Please help.
There is no value property in textarea when form tags are used. Path property is used for data binding. For eg., just before rendering the view in which you are using this textarea, populate the model object with the data in your controller as:
In your articleView jsp: