我必须在第一个控制器的基础上调用一个控制器我必须调用另一个控制器......但这在 spring 3 mvc 中不起作用............
@Controller
public class ajaxContoller {
@RequestMapping(value="/mmiFacade",method=RequestMethod.POST)
public @ResponseBody String mmiFacade(@RequestParam String sType){
String forwardName = "";
if (sType.equalsIgnoreCase("Pincode")) {
forwardName = "forward:/pincodeAction";
} else if (sType.equalsIgnoreCase("Locality")) {
forwardName = "forward:/localityAction";
} else if (sType.equalsIgnoreCase("Patient")) {
forwardName = "forward:/patientAction";
} else if (sType.equalsIgnoreCase("Dlhdata")) {
forwardName = "forward:/Dlhdata";
}
return forward;
}
@RequestMapping(value="/pincodeAction",method=RequestMethod.POST)
public @ResponseBody String ajax(){
return "hiii";
}
@RequestMapping(value="/localityAction",method=RequestMethod.POST)
public @ResponseBody String ajax1(){
return "hiii1";
}
}