Goo Morning I have problem redirecting my User when they try to Logon Here is my UserController Code:
@RequestMapping(value="registerArtist.html",method = RequestMethod.POST)
public ModelAndView showInput(@RequestParam("username")
String username,@RequestParam("password")String password)
{
ModelAndView model= new ModelAndView();
User user = userService.login(username, password);
if(user!= null)
{
if(user.getUsername().equals(username) && user.getPassword().equals(password))
{
model.setViewName("artistRegistration");
}
else
{
model.setViewName("register");
}
}else
{
model.setViewName("index");
}
return model;
}
And here is where I want User to go when their Logon Details are correct this is my
JSP:
<form method="post" action="/KyaamiProject/registerArtist.html">
<input type="text" path="username" id="login_username" onfocus="if (this.value=='username') this.value = '';" onblur="if (this.value=='') this.value = 'username';" value="username" placeholder="username" />
<input type="password" path="password" id="login_password" onfocus="if (this.value=='password') this.value = '';" onblur="if (this.value=='') this.value = 'password';" value="password" placeholder="password" />
<input type="submit" value="Log-in" style="height: 25px; width: 50px" class="tbutton small" />
</form>
Please Help!!!