title: Spring boot controller + thymeleaf page refresh
body: <p>I am developing a dashboard page which will parse files and generate charts. So when I click submit button, I want that page should get reloaded or refreshed after successful post method. I have enabled security also, but disabled csrf().</p>
  
  <p>Here is my controller,</p>
  
  <pre><code>@RequestMapping(value = "/analyze.go", method = RequestMethod.POST)
      @ResponseBody
      public String analyze(@RequestParam("logFile") MultipartFile file) { 
          //my code
  
          return "{}";
          //return "redirect:dashboard.html"; 
      }
  </code></pre>
  
  <p>Here is my thymeleaf template named as dashboard.html,</p>
  
  <pre><code>    &lt;form role="form" enctype="multipart/form-data" th:action="@{/analyze.go}"
                                  method="post"&gt;
                                  &lt;div class="form-group"&gt;
                                      &lt;label for="logFile"&gt;File input&lt;/label&gt; &lt;input type="file"
                                          name="logFile" id="logFile"/&gt;
                                      &lt;p class="help-block"&gt;Select only *.log or any text type of
                                          files&lt;/p&gt;                                       
                                      &lt;input type="submit" class="btn btn-primary" value="Submit"/&gt;
                              &lt;/form&gt;
  </code></pre>
  
  <p>Currently it is redirecting to <a href="http://localhost:9090/analyze.go" rel="nofollow">http://localhost:9090/analyze.go</a> page. Any idea how to overcome this issue. I tried with returning "redirect:redirect_page" but it is not working.</p>