samedi 28 février 2015

Spring @RequestMapping Controller Forwarding


@RequestMapping({"/someurl"})
public String execute(Model model) {
if (someCondition) {
return "forward:/someUrlA";
} else {
return "forward:/someUrlB";
}
}


Im trying to forward request from a controller to another controller. When I run this the controller returns string as response instead of forwarding to the other controller... Can someone please point out what I'm missing?


Thanks!!


Aucun commentaire:

Enregistrer un commentaire