0
votes

I am getting this exception

Character decoding failed. Parameter [updatedLocalInfo] with value 

org.apache.tomcat.util.buf.UDecoder$DecodeException: isHexDigit

I am passing request post data as JSON string and one of the values contains'%' Because of this '%' i am getting this exception.

I am not able to figure out why this exception is Coming and how to fix it.

For information, The json which i am passing is

[{"taxInformation":"Applicable Taxes Extra","happyHourDesc":"40%  off","happyHourTime":"4 to 8 PM","offer":"No Offers"}] 
1

1 Answers

2
votes

I am passing request post data as JSON string

My guess would be you're passing the JSON string without properly encoding it. When you send information from the client to the server via HTTP GET or POST, the information must be properly encoded. The most common way to do that is via URL encoding (even if it's POST data).

You haven't said how you're sending the data, but it sounds like you probably need to use encodeURIComponent at some stage during the generation of the data you're sending from the client to the server.