Spring <form:form> Tag

This tag renders an HTML ‘form’ tag and exposes a binding path to inner tags for binding. It puts the command object in the PageContext so that the command object can be accessed by inner tags. All the other tags in this library are nested tags of the form tag.

<form:form commandName="login">

The “comandName” attribute tells the form the name of the command object that contains our form data (specified in your form controller by called setCommandName()…it defaults to “command” if you don’t call setCommandName() in your controller). In this case, I’ve named my command “login”.

, ,

No comments yet.

Leave a Reply