SpringMVCのbindタグ

こういう書き方があるらしい。

<form action="login.form" method="POST">
<table>
	<tr>
		<td>Login Name:</td>
		<td><spring:bind path="login.loginname">
			<input type="text" name="${status.expression}"
				value="${status.value}">
		</spring:bind></td>
	</tr>
	<tr>
		<td>Password:</td>
		<td><spring:bind path="login.password">
			<input type="password" name="${status.expression}"
				value="${status.value}">
		</spring:bind></td>
	</tr>
	<tr>
		<td colspan="2"><input type="submit" name="Login" value="Login"></td>
	</tr>
</table>
</form>

spring:bindタグでフォームを囲う。タグにはpathという属性を書く。
このタグで囲まれたスコープには、statusという変数が使えるようになり、中身にbindタグで書いたpath属性に関するデータが入る。


若干冗長だが、この書き方ならカスタムタグ入れてもHTMLが崩れないんじゃないか?と思った次第。