I have a URL like https://<domainname>/popup.jsp?sitekey=7-8&type=popup
of this the request parameter string (sitekey=7-8&type=popup) is formed dynamically and then appended to the request URL and then a AJAX request is submitted.
Before attaching the request parameter string to the URL we use escape() function of JS.
so its like :
var URL=/popup.jsp?;
var reqVal="sitekey=7-8";
reqVal=reqVal+"&type=popup";
URL=URL+escape(reqVal);
So the URL actually is submitted as
/popup.jsp?sitekey%3D7-8;amp&type%3Dpopup
In servlet when loop through the request parameter names I get parameter name as sitekey%3D7-8 instead of only sitekey and hence my code breaks when I try to get value of sitekey by using request.getParameter("sitekey")
Please help as to how I decode the URL so that request parameter name I get is proper.