title: How to pass request parameter to 'default-target-url'
body: <p>I am setting 'cat=1' in the hidden field in login.jsp page and was expecting it to be available on the default-target-url. Entry in spring-security.xml is,</p>
  
  <pre><code>&lt;form-login login-page="/login.html" default-target-url="/index.html"
              authentication-failure-url="/loginfailed.html" /&gt;
  </code></pre>
  
  <p>and in the controller,</p>
  
  <pre><code>@RequestMapping(value="/index", method = RequestMethod.GET)
      public String index(HttpServletRequest request) {
          String cat = request.getParameter("cat");
          if (cat != null &amp;&amp; cat.equalsIgnoreCase("1")) {
              return "add";
          }  
          return "redirect:/index.jsp";
      }
  </code></pre>
  
  <p>but cant get request parameter value (cat is null) so I believe it is because 'default-target-url' redirects the request (and does not forward it?). Is it the case?</p>
  
  <p>If yes then is there any way I can pass parameter to the 'default-target-url'?</p>