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

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -