java - Display message in a toastr from controller in Spring -
java - Display message in a toastr from controller in Spring -
i using toast display success message on jsp page , inquire if there way display username set in session in controller in toast along success message. toast :-
toastr.success('successfully', 'registered',{timeout:2000});
my controller has next line of code set username:- session.setattribute("username",username);
where username has fullname attribute.
first should set message model or modelandview, such
model.put("message","ok");
then can utilize $ display message value in jsp.
toastr.success('${message}', 'registered',{timeout:2000});
java jquery spring jsp
Comments
Post a Comment