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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -