@RequestMapping(value = "/account/changePassword", method = RequestMethod.POST)
public String submitChangePasswordPage(
@RequestParam("oldpassword") String oldPassword,
@RequestParam("password") String newPassword,
HttpServletRequest request) {
System.out.println("change password.............");
try{
jdbcUserDetailsManager.changePassword(oldPassword, newPassword);
}
catch( AuthenticationException e )
{
System.out.println( "Old password is incorrect!please rechange" );
//e.printStackTrace();
return "redirect:/account/change";
}
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
User user = (User)auth.ge
public String submitChangePasswordPage(
@RequestParam("oldpassword") String oldPassword,
@RequestParam("password") String newPassword,
HttpServletRequest request) {
System.out.println("change password.............");
try{
jdbcUserDetailsManager.changePassword(oldPassword, newPassword);
}
catch( AuthenticationException e )
{
System.out.println( "Old password is incorrect!please rechange" );
//e.printStackTrace();
return "redirect:/account/change";
}
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
User user = (User)auth.ge