title: Display some simple data in HTML
body: <p><code>activeUsers.getUsers()</code> returns a list with the online users in my app.</p>
  
  <p>I want to display it in my HTML but I have no idea how to do this. I'm getting error 404 on my ajax request yet if I put a breakpoint in my controller it shows the list of online users.</p>
  
  <p>Any help??</p>
  
  <p>Controller</p>
  
  <pre><code>  @RequestMapping(value = "/loggedUsers", method = RequestMethod.GET)
  public String getLoggedUsers(Model model) {
      model.addAttribute("loggedUsers", activeUsers.getUsers());
      return "loggedUsers";
  }
  </code></pre>
  
  <p>AJAX</p>
  
  <pre><code>$(document).ready(function () {
  
  //get loggedUsers
  $.ajax({
      url: '/loggedUsers',
      type: 'get',
      success: function (loggedUsers) {
          console.log(loggedUsers);
      }
  });
  });
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="sidebar-right" class="visible"&gt;
  &lt;ul class="sidebar-nav"&gt;
      &lt;li id="dashboard"&gt;
          &lt;a href="dashboard"&gt;
              &lt;c:forEach var="loggedUser" items="${loggedUsers}"&gt;
                  &lt;span class="menu-title"&gt;${loggedUser}&lt;/span&gt;
              &lt;/c:forEach&gt;
          &lt;/a&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p></p>
  
  <p>the console log returns:</p>
  
  <blockquote>
    <p>error 404</p>
  </blockquote>