java - Multiple SessionAttributes into modelmap -


i pretty new spring, sorry if question may appear rather easy or obvious, trying answer bus wasn't able find it. question how use multiple sessionattributes , them map in 1 method?

i.e. have @controller uses sessionattributes:

@controller @sessionattributes({"name", "lastname", "birthdate"}) public class searchcontroller {      @requestmapping(value = "/your-relatives")     public string findrelatives(modelmap model) {         string name = (string) model.get("name");         string lastname = (string) model.get("lastname");         string birthdate = (string) model.get("birthdate");         if (name.equals("john") && lastname.equals("johnny")) {             return "yes";         }         return "no";     }  } 

but when trying return "yes" in case when if true, error - there unexpected error (type=internal server error, status=500). no message available

it works when using 1 of attributes.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -