Am sending data from JSP to controller using query string.
My controller is annotation driven.
The value of the the request parameter should be case-insensitive.
The method which i use for welcome page is
public String welcome(@RequestParam("orgID") String orgID, ModelMap model)
The request parameter "orgID" should be case insensitive. How to do this ?.
I should be able to give the query-string as "orgid" or "orgId". The parameter should be completely case-insensitive. Looking for your help friends.
Thanks in Advance :-)
解决方案
There is a simple workaround.You can operate directly on the HttpServletRequest and use method getParameter() and check all versions of parameter.
public String welcome(HttpServletRequest request, ModelMap model){
String orgID = extractOrgId(request);
//rest of your code
}
private String extractOrgId(HttpServletRequest request){
if(request.getParameter("orgId") != null){
return request.getParameter("orgId");
}
// and so on
}