title: Spring MVC Rest, invoking using URL, escape characters &amp; causing issue for getting the value in controller
body: <p>I have a controller mapping as below</p>
  
  <pre><code> @RequestMapping(value = { "/search"}, method = RequestMethod.GET)
   public @ResponseBody
   Object searchProducts(@PathVariable("query") String query,
   @RequestParam(value = "param1", required = false) String param1,
   @RequestParam(value = "param2", required = false) String param2,)
  </code></pre>
  
  <p>when i use url as given below it works fine i even get the value populated by spring</p>
  
  <pre><code> http://host/app_name/search?param1=[value]&amp;param2=[value]
  </code></pre>
  
  <p>But when escape character is used it breaks</p>
  
  <pre><code> http://host/app_name/search?param1=[value]&amp;amp;param2=[value]
  </code></pre>
  
  <p>Is there any configuration in springcontext or web.xml which will allow me to take care of encoding automatically ??
  i have already tried setting below contect in web.xml but it does not work</p>
  
  <pre><code> &lt;context-param&gt; 
   &lt;param-name&gt;defaultHtmlEscape&lt;/param-name&gt; 
   &lt;param-value&gt;true&lt;/param-value&gt; 
   &lt;/context-param&gt;  
  </code></pre>