title: Spring mvc. case insensitive get parameters mapping
body: <p>according <a href="https://stackoverflow.com/a/29533456/2674303">this answer</a> I try to write my code:</p>
  <p>pojo:</p>
  <pre><code>class MyBean{
  
      public String getValueName() {
          return valueName;
      }
  
      public void setValueName(String valueName) {
          this.valueName = valueName;
      }
  
      String valueName;
  }
  </code></pre>
  <p>inside controller:</p>
  <pre><code>    @ModelAttribute
      public MyBean createMyBean() {
          return new MyBean();
      }
      @RequestMapping(value = &quot;/getMyBean&quot;, method = RequestMethod.GET)
      public String getMyBean(@ModelAttribute MyBean myBean) {
          System.out.println(myBean.getValueName());
          return &quot;pathToJsp&quot;;
      }
  </code></pre>
  <p>web.xml configuration:</p>
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;caseInsensitiveFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;com.terminal.interceptor.CaseInsensitiveRequestFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;caseInsensitiveFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  <p>Filter:</p>
  <pre><code>@Component
  public class CaseInsensitiveRequestFilter extends OncePerRequestFilter {
      @Override
      protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
          filterChain.doFilter(new CaseInsensitiveHttpServletRequestWrapper(request), response);
      }
  
      private static class CaseInsensitiveHttpServletRequestWrapper extends HttpServletRequestWrapper {
  
          private final LinkedCaseInsensitiveMap params = new LinkedCaseInsensitiveMap();
  
          /**
           * Constructs a request object wrapping the given request.
           *
           * @param request
           * @throws IllegalArgumentException if the request is null
           */
          private CaseInsensitiveHttpServletRequestWrapper(HttpServletRequest request) {
              super(request);
              params.putAll(request.getParameterMap());
          }
  
          @Override
          public String getParameter(String name) {
              String[] values = getParameterValues(name);
              if (values == null || values.length == 0) {
                  return null;
              }
              return values[0];
          }
  
          @Override
          public Map getParameterMap() {
              return Collections.unmodifiableMap(this.params);
          }
  
          @Override
          public Enumeration getParameterNames() {
              return Collections.enumeration(this.params.keySet());
          }
  
          @Override
          public String[] getParameterValues(String name) {
              return (String[]) params.get(name);
          }
      }
  }
  </code></pre>
  <p>In debug I see that filter method invoke but I cannot achieve case insentive get parameters mapping.</p>
  <p>for example <code>localhost:8081/getMyBean?valueName=trololo</code> works but <code>localhost:8081/getMyBean?valuename=trololo</code> - not</p>