There are lot of posts in this regard. But mine looks bit strange.
The moment i include the below two lines after form tag in my jsp, the above error occurs upon loading of registration page.
My form tag is as below:Code:<font color="red"><form:errors path="regEmail" /></font> <font color="red"><form:errors path="regPasswd" /></font>
My controller code is as given below:Code:<portlet:actionURL var="aURL"> <portlet:param name="action" value="registration"/> </portlet:actionURL> <form:form commandName="reg" method="post" action="${aURL}" enctype="application/x-www-form-urlencoded">
Can somebody help me resolve the above error? Thanks so much for any help.Code:public class RegistrationController extends SimpleFormController { public RegistrationController() { } private RegistrationService regService; @Override protected void onSubmitAction(ActionRequest request, ActionResponse response, Object command, BindException arg3) throws Exception { System.out.println("Entering RegistrationController -> onSubmitAction"); Registration regObj = (Registration) command; System.out.println("values from request object are -----> " + regObj.getRegFirstName() + ", " + regObj.getRegLastName() + ", " + regObj.getRegEmail() + ", " + regObj.getRegPasswd()); boolean flag = regService.performRegistration(regObj); if(!flag) { throw new Exception("User Id already exists!! Please select different user id."); } System.out.println("Leaving RegistrationController -> onSubmitAction"); response.setRenderParameter("action","regsuccess"); } public ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) throws Exception { System.out.println("ENtering RegistrationController -> handleRenderRequestInternal"); System.out.println("Leaving RegistrationController -> handleRenderRequestInternal"); return new ModelAndView("registration"); } public void setRegService(RegistrationService regService) { this.regService = regService; } }


Reply With Quote