How to send special characters in request parameters in Spring

Viewed 14144

How to handle special characters in request parameters? Here is my controller:

@Scope("request")
@RestController
public class GetOperatorSeries{
@RequestMapping(value = "test", method = RequestMethod.GET)
    public String getOperatorSeries(HttpServletResponse response, @RequestParam(value = "mobno") long mobno,
            @RequestParam(value = "sourceType") String sourceType,
            @RequestParam(value = "responseType") String responseType)
{

}

For example if I use any special characters in request param then it do not read it, like if I am sending "sourceType= @$abc" then it would read it as null or empty. But I want that it should read special characters also.

1 Answers
Related