I have this form that allows user to modify a bean saved in DB:
<html:form action="/confMod">
<table id="inserimento">
<tr>
<td>Titolo</td>
<td><html:text property="titolo" value="${libro.titolo }"/>
</tr>
<tr>
<td>Pagine</td>
<td><html:text property="pagine" value="${libro.pagine }"/>
</tr>
<tr>
<td>ISBN</td>
<td><html:text property="isbn" value="${libro.isbn }"/>
</tr>
</table>
<html:hidden property="idLibro" value="${idLibro }"/>
<html:hidden property="opCod" value="modifica" />
<html:submit value=" Inserisci " />
When user submit, the validate()
methods checks input. If input isn't correct, Struts return to the jsp that contain form, but values are empty.
I want to maintain old values in form... How can I do that?
I don't want to access to BD in validate()
method nor save it in session.