I am very new to WebApp in general and Spring MVC in particular. I am writing a small project where I wish to get the key value pair posted by a client. I can do it if I know the value of the key beforehand. The tutorials I've read in parameter processing also assumes that you know the parameter name. But what if I don't know the parameter name.
@Controller
@RequestMapping(value = "/keyvaluepost")
public class ProcessController {
@RequestMapping(method = RequestMethod.POST)
public String doPost(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam("knownKey") String knownKey) {
// process knownKey here
// but what if i do not know the key?
}
Basically, I am looking for something similar to $_POST in php where I can get the key value pair. Any help will be greatly appreciated. Thanks.