I am sendin post request from jquery like this :
$.ajax({
type: "POST",
url: "Save",
data: { conr: conr ,expiry : expiry,settings : settings}
inside servlet , i am able to get parameters (conr , expiry , settings)
but the problem is that
the settings parameter contains serialized form data : like this :
high=true&ci=false&title=qTip+as+Button+Menu&private=true&email=abc@google.com
I know that i can use string tokenizer to get data but i want to make sure that- if their is any simple way or not?
You could use the HttpComponents and let
URLEncodedUtilsparse it for you.So you could just invoke
URLEncodedUtils.parse(yourString,Charset.forName("UTF-8"))and you receive as return aList<NameValuePair>containing name and value associated elements. In this case something like: hight = “true”, title = “qTip as Button Menu” and so on. And this all with the right decoded.