title: How do I configure this Spring project correctly?
body: <p>Me and my team are trying to setup a Spring project, and would like to implement REST services. But when I try to deploy it to tomcat 7, I get an error. Here is the output:</p>
  
  <pre><code>Jan 22, 2012 9:39:34 PM org.apache.catalina.core.AprLifecycleListener init
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
  Jan 22, 2012 9:39:34 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:niths' did not find a matching property.
  Jan 22, 2012 9:39:34 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-8080"]
  Jan 22, 2012 9:39:34 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
  Jan 22, 2012 9:39:34 PM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 497 ms
  Jan 22, 2012 9:39:34 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  Jan 22, 2012 9:39:34 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.25
  Jan 22, 2012 9:39:34 PM org.apache.catalina.startup.ContextConfig webConfig
  SEVERE: Unable to determine URL for WEB-INF/classes
  javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found
      at org.apache.naming.resources.BaseDirContext.listBindings(BaseDirContext.java:733)
      at org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:546)
      at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
      at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:825)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
  
  Jan 22, 2012 9:39:37 PM org.apache.catalina.core.ApplicationContext log
  INFO: No Spring WebApplicationInitializer types detected on classpath
  Jan 22, 2012 9:39:37 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  Jan 22, 2012 9:39:37 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  Jan 22, 2012 9:39:37 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 3208 ms
  </code></pre>
  
  <p>I have tried Googling <code>javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found</code> without luck. I am guessing the project was not deployed at all.</p>
  
  <p>The project is hosted on <a href="http://github.com/whirlwin/niths" rel="nofollow">this GitHub repo</a>.</p>
  
  <ul>
  <li><a href="https://github.com/whirlwin/niths/blob/master/src/main/webapp/WEB-INF/web.xml" rel="nofollow">Deployment descriptor</a></li>
  <li><a href="https://github.com/whirlwin/niths/blob/master/src/main/java/no/niths/rest/CourseController.java" rel="nofollow">The REST controller</a></li>
  </ul>
  
  <p>I have added a very simple method for testing my application: <code>getBaz()</code>, which I guess would be invoked at <code>localhost:8080/niths/rest/baz</code>.</p>
  
  <p>I am having a hard time figuring out what is missing as this is my first Spring project, and would therefore be grateful if someone skilled in the arts of Spring would point out what's the problem!</p>