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

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -