title: <form:form action in spring
body: <p>I have an spring application with this welcome page in the web.xml</p>
  
  <pre><code>&lt;welcome-file-list&gt;
     &lt;welcome-file&gt;/search/search.do&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  </code></pre>
  
  <p>and this controller</p>
  
  <pre><code>@Controller
  public class SearchController {
  
      @RequestMapping(value = "/search/search.do", method = RequestMethod.GET)
      private String initForm(@ModelAttribute("searchForm") final SearchForm SearchForm, 
                               BindingResult result, HttpServletRequest request, Model model, Locale locale) {
  
          sessionHelper.checkSessionAttributes(request,  locale);
          return "searchView";
      }
  
  
      @RequestMapping(value = "/search/performDevicesearch.do", method = RequestMethod.POST)
      private String performDeviceSearch(@ModelAttribute("searchForm") final SearchForm SearchForm, 
                               BindingResult result, HttpServletRequest request, Model model, Locale locale) {
  
          sessionHelper.checkSessionAttributes(request,  locale);
          return "searchView";
      }           
  }
  </code></pre>
  
  <p>and this JSP</p>
  
  <pre><code>&lt;form:form commandName="searchForm" name="simpleSearchForm" id="simpleSearchForm"  method="post" action="search/performproductsearch.do" class="TTWForm1"   &gt;
  </code></pre>
  
  <p>so I put this in the URL</p>
  
  <p><a href="http://127.0.0.1:7001/devices" rel="nofollow">http://127.0.0.1:7001/devices</a></p>
  
  <p>Then I submit and I see this in the URL</p>
  
  <p><a href="http://127.0.0.1:7001/devices/search/performproductsearch.do" rel="nofollow">http://127.0.0.1:7001/devices/search/performproductsearch.do</a></p>
  
  <p>Then I submit again but I see this in the URL (!?)</p>
  
  <pre><code>http://127.0.0.1:7001/devices/search/search/performproductsearch.do
  </code></pre>