title: Spring MVC with Boot: "There was an unexpected error (type=Not Found, status=404)"
body: <p>So I'm new to Spring and I've so far gotten a simple web API running connected to a MongoDB database, but I'm having trouble generating just plain old views using .jsp or .html files. I've tried a variety of different approaches: <code>InternalResourceViewResolver</code>, <code>XmlViewResolver</code>, returning Strings instead of <code>ModelAndView</code> objects, nothing seems to be working for me. I have the following code:</p>
  
  <p><strong>Edit</strong>: here is a git repo with my project: <a href="https://github.com/jwallp/Spring-Test" rel="nofollow">https://github.com/jwallp/Spring-Test</a></p>
  
  <p>As the above project is, I am getting a white label error upon going to <code>/index</code> which says:</p>
  
  <pre><code>There was an unexpected error (type=Internal Server Error, status=500).
  Circular view path [index]: would dispatch back to the current handler URL [/index] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
  </code></pre>
  
  <p><strong>Edit</strong>: So I managed to get the view to finally load by using <code>spring.view.prefix</code> and <code>spring.view.suffix</code> instead of <code>spring.mvc.view.prefix</code> and such, and by moving my <code>WEB-INF</code> directory from my project root to inside <code>&lt;project root&gt;/src/main/webapp/</code>. I just wanted to know, if my <code>WEB-INF</code> directory is contained within another directory, will it still function as intended (making its contents not directly visible)?</p>