title: How to fix filterFormParameters warning?
body: <p>I have a rest service with post operation that forwards a request to another get operation service. I keep getting this warning message <code>WARNING: A servlet request to the URI http://localhost:8080/rest/services/userInfo?email=test%40test.fi contains form parameters in the request body but the request body has been consumed by the servlet error continues..</code> Also the target page doesn't load and I get an error: <code>Error 405 Method Not Allowed</code>. At this point I don't know what I should do to get the target page to load correctly. Any help is much appreciated.</p>
  <p>Rest service:</p>
  <pre><code>    @POST
      @Path(&quot;/login&quot;)
      @Consumes(&quot;application/x-www-form-urlencoded&quot;)
      public void login(MultivaluedMap&lt;String, String&gt; mvm, @Context HttpServletRequest request,
              @Context HttpServletResponse response) {
  
          Dao dao = new Dao();
  
          // return values as string.
  
          String email = mvm.getFirst(&quot;email&quot;);
          String password = mvm.getFirst(&quot;paswd&quot;);
  
          System.out.println(&quot;Your email: &quot; + email);// Delete Later!!
          System.out.println(&quot;Your password: &quot; + password);// Delete Later!!
          System.out.println(&quot;Test passed0&quot;);
          // Read reference values from DB
          String salt = dao.getUserSalt(email);
          String hashpw = dao.getUserpasswordHash(email);
          System.out.println(&quot;Test 1 passed&quot;);
          dao.checkemail(email);
          try {
              System.out.println(&quot;Test 2 passed&quot;);
              if (SecurityUtils.isPasswordOk(hashpw, password, salt)) {
                  System.out.println(&quot;Test 3 passed&quot;);
                  String data = email;
                  HttpSession session = request.getSession();
                  User user = dao.readUserInfo(data);
                  dao.close();
                  System.out.println(&quot;Test 4 passed&quot;);
                  session.setAttribute(&quot;LoggedUser&quot;, user);
                  System.out.println(&quot;Session: &quot; + request.getSession(false));
                  session.setMaxInactiveInterval(30 * 60);
                  System.out.println(&quot;Test 5 passed&quot;);
                  RequestDispatcher rd = request.getRequestDispatcher(&quot;userInfo?email=&quot; + data);
                  System.out.println(&quot;Final Test 6 passed&quot;);
                  try {
                      rd.forward(request, response);
                  } catch (IOException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  }
  
              } else {
                  dao.close();
                  RequestDispatcher rd = request.getRequestDispatcher(&quot;./index.html&quot;);
                  try {
                      rd.include(request, response);
                  } catch (ServletException | IOException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  }
  
              }
          } catch (Exception e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
      }
  </code></pre>
  <p>The second service:</p>
  <pre><code>    @GET
      @Path(&quot;/userInfo&quot;)
      public void userInfo(@Context HttpServletRequest request,
              @Context HttpServletResponse response) {
      
          HttpSession session = request.getSession();
  
          User user = (User) session.getAttribute(&quot;LoggedUser&quot;);
  
          if (user != null) {
              try {
  
                  session.setAttribute(&quot;readUsersInfo&quot;, user);
  
                  RequestDispatcher rd = 
                 request.getRequestDispatcher(&quot;./jsp/profile.jsp#ty&quot;);
                  rd.forward(request, response);
  
              } catch (Exception e) {
                  e.printStackTrace();
              }
          } else {
              // Back to list
              try {
                  response.sendRedirect(&quot;./index.html&quot;);
              } catch (IOException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
  
          }
      }
  </code></pre>