Solution 1:
By decoding the parameters like below,
public void getParametersFromRequest(HttpServletRequest request, HttpServletResponse response) {
String partyId = request.getParameter("partyId");
String uid= request.getParameter("uid");
String name= request.getParameter("name");
}
Solution 2:
You can achieve this using below method.
public static Map<String, String> getQueryMap(String query)
{
String[] params = query.split("&");
Map<String, String> map = new HashMap<String, String>();
for (String param : params)
{
String [] p=param.split("=");
String name = p[0];
if(p.length>1) {
String value = p[1];
map.put(name, value);
}
}
return map;
}
So then you can use:
Map params=getQueryMap(querystring);
String partyId=(String) params.get("partyId");
String uid=(String) params.get("uid");
String name=(String) params.get("name");