Tushar Goel wrote:I am not sure bt i think you are mssing @ModelAttribute in the controller method.. so your method should be like this:
Hi, I appreciate your help however my problem is my login screen itself is not populating means looks like following method has some problem:-
@RequestMapping(method = RequestMethod.GET)
public String showLoginPage(@ModelAttribute("userForm") UserForm userForm, BindingResult bindingResult, ModelMap modelMap){
logger.info("**************");
userForm = (UserForm) modelMap.get(userForm);
modelMap.addAttribute("userForm", "userForm");
return "login";
}
I added @ModelAttribute also but somehow I feel like my form bean i.e. UserForm is not being recognized with this login JSP as a result im still getting following error during loading it:-
org.springframework.beans.NotReadablePropertyException: Invalid property 'username' of bean class [java.lang.String]: Bean property 'username' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?