title: Encoding with UTF-8 does not work in JSP
body: <p>I use the following jsp to search some text:</p>
  
  <pre><code>&lt;%@page session="false" contentType="text/html; charset=utf-8" %&gt;
  ..
  ...
  &lt;form method="post"  action="searchPageAction.html"&gt;
      &lt;input type="text" name="search_value"  value="ö-Test"/&gt;
  &lt;/form&gt;
  
  ...
  </code></pre>
  
  <p>the Servlet looks like this:</p>
  
  <pre><code>public class SearchServlet {
  private static final String SEARCH_VALUE = "search_value";
  
  @Override
  protected final void doPost(final SlingHttpServletRequest request, final SlingHttpServletResponse response) throws ServletException {
      try {
          request.setCharacterEncoding("UTF-8");
      } catch (UnsupportedEncodingException e1) {
          e1.printStackTrace();
      }
      String searchValue = request.getParameter(SEARCH_VALUE);
      String redirectPath = "/content/vrbp/de/tools/suchergebnis.html?q="+searchValue+"&amp;_charset_=UTF-8";
      try {
          response.setCharacterEncoding("UTF-8");
          response.sendRedirect(redirectPath);
      } catch (IOException e) {
  
      } catch (IllegalStateException e) {
         }
  }
  }
  </code></pre>
  
  <p>Now when I search for example for "ö-Test", The following link is written in the browser: </p>
  
  <blockquote>
    <p><a href="http://www.testproject:4502/content/myProject/searchResult.html?q=%F6-Test&amp;_charset_=UTF-8" rel="nofollow">http://www.testproject:4502/content/myProject/searchResult.html?q=%F6-Test&amp;<em>charset</em>=UTF-8</a></p>
  </blockquote>
  
  <p>I have expected:</p>
  
  <blockquote>
    <p><a href="http://www.testproject:4502/content/myProject/searchResult.html?q" rel="nofollow">http://www.testproject:4502/content/myProject/searchResult.html?q</a>=ö-Test&amp;<em>charset</em>=UTF-8</p>
  </blockquote>
  
  <p>and the text <code>ö-Test</code> ist printet in searchResult.html as <code>&amp;#65533;-Test</code>. How to encode correct in <code>UTF-8</code>? What did I do wrong?</p>