posted 13 years ago
I have one redirect.jsp(just under my application named myproj3),where sendRedirect(“welcome.htm”) is mentioned and in dispatcher-servlet.xml it is methioned---
<bean name="/welcome.htm" class="control.GetValueController" >
<property name="formView" value="index" />
<property name="validator"> <ref bean="userValidator"/></property>
</bean>
In GetValueController(it extends SimpleFormController) it is written that -----
onSubmit(HttpServletRequest request,
HttpServletResponse response, Object command, BindException errors)
throws Exception {
User user = (User)command;
return new ModelAndView("result","abc",user);
}
so result.jsp will called and I have printed the field values come from index.jsp.
No I want in result.jsp I will add –
<form:form method="POST" commandName="user1">
<form:input path="credential" />
<form:password path="password"/>
</form:form>
User1 represent User1.class which is mentioned in dispatcher-servlet.xml.
But how can I call another controller or call the previous one by which I can print “credential” and “password” field in some other field like “result1.jsp”.
How I will do that ?
Thanks in advance