java - how to get the object from a redirected view? -
im using spring mvc, java , annotations.
@requestmapping(value = "/submittask", method = requestmethod.post) public modelandview submittask(httpsession session, httpservletrequest request) { map<string, object> map = new hashmap<string, object>(); modelandview model = new modelandview(new redirectview("home.html")); map.put("email", request.getparameter("email")); map.put("task",request.getparameter("task")); map.put("error", request.getparameter("error")); model.addobject("map", map); return model; } @requestmapping("/home") public modelandview home(httpsession session, httpservletrequest request) { modelandview model = new modelandview("home"); model.addobject("map", request.getparameter("map")); return model; }
i don't seem value of "map" via "request.getparameter("map")" when redirected view home.html. how can able retrieve it. thanks
i belive problem httpservletrequest request passed "home" method contains parameter "map.email", "map.task", "map.error", not "map".
Comments
Post a Comment