title: How to change tomcat compiler
body: <p>I'm trying to use the new Java 7 switch on strings feature.</p>
  
  <p>But Tomcat is not cooperating.</p>
  
  <p>I've made sure that tomcat is running under java 7 but it seems that it's not compiling under it.</p>
  
  <p>I've added the following to the web.xml file, under the jsp servlet entry</p>
  
  <pre><code>    &lt;init-param&gt;
          &lt;param-name&gt;compiler&lt;/param-name&gt;
          &lt;param-value&gt;C:/Program Files/Java/jdk1.7.0/bin/javac.exe&lt;/param-value&gt;
      &lt;/init-param&gt;
  </code></pre>
  
  <p>but it doesn't seem to do the trick.</p>
  
  <p>Any tips would be appreciated.</p>