0

I am facing an issue where url sent to spring rest service containing parameter "xyz=abc & amp ;emailDate=2014-09-09"

This URL is hit from emails sent to the customer. And when customer hits the URL some browser client on user's mobile is not converting "& amp ;" to &.

Please ignore spaces above. Stackoverflow is converting & amp ; to & if there are no spaces.

When request comes to server we see emailDate as null. Server side code is as below.

@RequestMapping(value="/openEmail", method=RequestMethod.GET)
public @ResponseBody byte[] openEmail(RequestParam(value="token",  required=false) String customerToken, @RequestParam(value="emailDate", required=false) String emailDate, HttpServletRequest request) throws IOException{

Can you please help me overcome this issue.

Sammy Pawar
  • 1,201
  • 3
  • 19
  • 38

1 Answers1

0

Please check if you set URIEncoding="UTF-8" in your server.xml ( if its tomcat ). More details here Get Parameter Encoding

Community
  • 1
  • 1
hi_my_name_is
  • 4,894
  • 3
  • 34
  • 50