title: JSP not Evaluating with Spring MVC
body: <p>I am trying to render JSP in a Spring 3.2 using annotation driven configuration, but the JSP renders as a string and is not evaluated.</p>
  <p>I am using the maven jetty plugin to run the webapp in development. So it seems as if everything should &quot;just work&quot;.</p>
  <p>The dependencies I am including to use JSP are</p>
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
    &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
    &lt;version&gt;2.1&lt;/version&gt;
    &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
    &lt;artifactId&gt;jstl&lt;/artifactId&gt;
    &lt;version&gt;1.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
    
  <p>The bean to configure JSP is</p>
  <pre><code>@Configuration
  public class WebAppConfiguration {
    @Bean
    public InternalResourceViewResolver internalResourceViewResolver() {
      InternalResourceViewResolver resolver = new InternalResourceViewResolver();
      resolver.setPrefix(&quot;/views/&quot;);
      resolver.setSuffix(&quot;.jsp&quot;);
      return resolver;
    }
  }
  </code></pre>
  <p>The controller is pretty straight forward</p>
  <pre><code>@Controller
  public class RootController {
    @RequestMapping(value = &quot;/login&quot;)
    public String login() {
      return &quot;login&quot;;
    }
  </code></pre>
  <p>and the JSP is also pretty easy</p>
  <pre><code>&lt;%@ taglib uri=&quot;http://java.sun.com/jsp/jstl/core&quot; prefix=&quot;c&quot;%&gt;
  &lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=UTF-8&quot; pageEncoding=&quot;UTF-8&quot; %&gt;
  &lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
  &lt;%= &quot;Hello World&quot; %&gt;
  ${ &quot;Hello World&quot; }
  &lt;form name=&quot;auth&quot; action=&quot;&lt;c:url value='j_spring_security_check' /&gt;&quot; method=&quot;POST&quot;&gt;
    &lt;label&gt;Username: &lt;input type=&quot;text&quot; name=&quot;j_username&quot;&gt;&lt;/label&gt;
    &lt;label&gt;Password: &lt;input type=&quot;password&quot; name=&quot;j_password&quot;&gt;&lt;/label&gt;
    &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;/&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>As you can see from the image the JSP is not being evaluated.  Is there anything I need to do to tell JSP to be evaluated when rendered.</p>
  <p><img src="https://i.stack.imgur.com/W4Zwq.png" alt="rendered page" /></p>
  <h3>Edit 1</h3>
  <p>So just for a little extra information I used the <a href="https://github.com/resthub/resthub.org/blob/master/spring-stack.rst#bootstrap-your-project" rel="nofollow noreferrer">Resthub archetype resthub-mongodb-backbonejs-archetype</a> to bootstrap this project, which uses a WebAppInitializer rather than the older web.xml, and it uses new annotation driven beans rather than the xml beans.</p>
  <hr />
  <h3>EDIT 2</h3>
  <p>I have been smashing my head on this for all to long so I put the project on github <a href="https://github.com/austinbv/calendar/" rel="nofollow noreferrer">https://github.com/austinbv/calendar/</a>. Since I do not know what is important and what is not.</p>
  <p>Thanks for the help</p>
  <hr />