title: servlet not available error in eclipse spring mvc projects
body: <p>i am running the project using eclipse. in one project i get the following error</p>
  
  <blockquote>
    <p>18/02/2011 12:23:41 AM
    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:
    C:\java\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\java\bin;C:\Program
    Files (x86)\MySQL\MySQL Server
    5.1\bin;C:\Program Files (x86)\IDM Computer
    Solutions\UltraEdit\;C:\java\bin
    18/02/2011 12:23:42 AM
    org.apache.tomcat.util.digester.SetPropertiesRule
    begin WARNING:
    [SetPropertiesRule]{Server/Service/Engine/Host/Context}
    Setting property 'source' to
    'org.eclipse.jst.jee.server:test' did
    not find a matching property.
    18/02/2011 12:23:42 AM
    org.apache.coyote.AbstractProtocolHandler
    init INFO: Initializing
    ProtocolHandler ["http-bio-8085"]
    18/02/2011 12:23:42 AM
    org.apache.coyote.AbstractProtocolHandler
    init INFO: Initializing
    ProtocolHandler ["ajp-bio-8009"]
    18/02/2011 12:23:42 AM
    org.apache.catalina.startup.Catalina
    load INFO: Initialization processed in
    511 ms 18/02/2011 12:23:42 AM
    org.apache.catalina.core.StandardService
    startInternal INFO: Starting service
    Catalina 18/02/2011 12:23:42 AM
    org.apache.catalina.core.StandardEngine
    startInternal INFO: Starting Servlet
    Engine: Apache Tomcat/7.0.8 18/02/2011
    12:23:42 AM
    org.apache.catalina.core.ApplicationContext
    log INFO: Marking servlet ds as
    unavailable 18/02/2011 12:23:42 AM
    org.apache.catalina.core.StandardContext
    loadOnStartup SEVERE: Servlet /test
    threw load() exception
    java.lang.ClassNotFoundException:
    org.springframework.web.servlet.DispatcherServlet
      at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
      at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
      at
    org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
      at
    org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
      at
    org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
      at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
      at
    org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:996)
      at
    org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4834)
      at
    org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5155)
      at
    org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5150)
      at
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at
    java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at
    java.lang.Thread.run(Thread.java:662)
    18/02/2011 12:23:42 AM
    org.apache.coyote.AbstractProtocolHandler
    start INFO: Starting ProtocolHandler
    ["http-bio-8085"] 18/02/2011 12:23:42
    AM
    org.apache.coyote.AbstractProtocolHandler
    start INFO: Starting ProtocolHandler
    ["ajp-bio-8009"] 18/02/2011 12:23:42
    AM
    org.apache.catalina.startup.Catalina
    start INFO: Server startup in 332 ms
    18/02/2011 12:23:52 AM
    org.apache.catalina.core.StandardWrapperValve
    invoke INFO: Servlet ds is currently
    unavailable</p>
  </blockquote>
  
  <p>my ds.servlet is</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.orf/schema/beans/spring-beans-2.0.xsd"&gt;
  
      &lt;!-- Configuring DataSource --&gt;
      &lt;bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource"&gt;
          &lt;property name="driverClassName"&gt;
              &lt;value&gt;com.mysql.jdbc.Driver&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="url"&gt;
              &lt;value&gt;jdbc:mysql://localhost:3306/springdb&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="username"&gt;
              &lt;value&gt;root&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="password"&gt;
              &lt;value&gt;root&lt;/value&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
  
      &lt;!-- Configuring jdbcTemplate --&gt;
      &lt;bean id="jdbctemp" class="org.springframework.jdbc.core.JdbcTemplate"&gt;
          &lt;constructor-arg&gt;
              &lt;ref local="datasource" /&gt;
          &lt;/constructor-arg&gt;
      &lt;/bean&gt;
  
      &lt;bean id="loginModel" class="com.santosh.spring.LoginModel"&gt;
          &lt;constructor-arg&gt;
              &lt;ref local="jdbctemp" /&gt;
          &lt;/constructor-arg&gt;
      &lt;/bean&gt;
  
      &lt;bean id="logincnt" class="com.santosh.spring.LoginController"&gt;
          &lt;property name="loginModel" &gt;
              &lt;ref local="loginModel"/&gt;
          &lt;/property&gt;
  
          &lt;!-- Configure Command ClassName  --&gt;
  
          &lt;property name="commandClass" &gt;
          &lt;value type="java.lang.Class"&gt; com.santosh.spring.UserDetails &lt;/value&gt;
          &lt;/property&gt;
  
          &lt;!-- Configure the command name , the name to use when binding the instantiated command class to the request --&gt;
  
          &lt;property name="commandName"&gt;
              &lt;value&gt; UserDetails &lt;/value&gt;
          &lt;/property&gt;
  
      &lt;/bean&gt;
  
  
      &lt;!-- Configure URL Mapping   --&gt;
  
      &lt;bean id="myurlmapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping" &gt;
          &lt;property name="mappings"&gt;
              &lt;props&gt;
                  &lt;prop key="/login.spring"&gt;logincnt&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
          &lt;property name="urlMap"&gt;
  &lt;map&gt;
  &lt;entry key="/hello.springs"&gt;
  &lt;ref bean="helloController"/&gt;
  &lt;/entry&gt;
  &lt;/map&gt;
  &lt;/property&gt;
      &lt;/bean&gt;
      &lt;bean id="helloController" class="net.roseindia.web.HelloWorldController"&gt; &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>