agrharsh
Sep 15th, 2005, 06:03 AM
Hi All,
I have created a Login jsp & LoginController which validates the user-id/password combination. Now what I want is that in case user-id/password do not match, user should be thrown an error on the same Login page. Here is what I have done to achive this:
Controller Code
return new ModelAndView(new RedirectView(getFailureView()), "errorLogin", "Invalid Login. Please try again.");
where in app-servlet.xml faliure view is defined like this:
<bean id="loginForm" class="com.etax.admin.login.controller.LoginController">
...
<property name="failureView"><value>login.htm</value></property>
...
</bean>
and URLMapping,
<prop key="/login.htm">loginForm</prop>
JSP Code:
<tr>
<td colspan=2>
<c:out value="${errorLogin}"/>
</td>
</tr>
I would deeply apreciate your inputs.
Thanks!!!
I have created a Login jsp & LoginController which validates the user-id/password combination. Now what I want is that in case user-id/password do not match, user should be thrown an error on the same Login page. Here is what I have done to achive this:
Controller Code
return new ModelAndView(new RedirectView(getFailureView()), "errorLogin", "Invalid Login. Please try again.");
where in app-servlet.xml faliure view is defined like this:
<bean id="loginForm" class="com.etax.admin.login.controller.LoginController">
...
<property name="failureView"><value>login.htm</value></property>
...
</bean>
and URLMapping,
<prop key="/login.htm">loginForm</prop>
JSP Code:
<tr>
<td colspan=2>
<c:out value="${errorLogin}"/>
</td>
</tr>
I would deeply apreciate your inputs.
Thanks!!!