使用spring标签出错
页面定义:
<form:form commandName="loginForm" method="post" action="login.do">
配置文件:
<bean id="loginAction" class="com.msd.deam.action.LoginAction">
<property name="commandName" value="loginForm"></property>
<property name="commandClass" value="com.msd.deam.form.LoginForm" />
<!--
<property name="validator">
<bean class="com.msd.student.model.StudentFormValidator" />
</property>
-->
<!-- 指定失败要返回的页面 -->
<property name="formView" value="login" />
<!-- 指定成功要返回的页面 -->
<property name="successView" value="success" />
<property name="loginService" ref="loginService" />
</bean>
报错:
Neither Binding Result nor plain target object for bean name 'loginForm' available as request attribute