title: Cannot find class for bean with name
body: <p>I am trying to run my web application on tomcat server and I am getting this error</p>
  
  <blockquote>
    <p>Related cause:
    org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
    find class [com.mycom.myproj.utility.CustomPassword] for bean with
    name 'customPassword' defined in ServletContext resource
    [/WEB-INF/spring-security.xml]; nested exception is
    java.lang.ClassNotFoundException:
    com.mycom.myproj.utility.CustomPassword</p>
  </blockquote>
  
  <p>and my configuration inside spring-security.xml</p>
  
  <pre><code>&lt;beans:bean id="customPassword" class="com.mycom.myproj.utility.CustomPassword" /&gt;
  </code></pre>
  
  <p>and my project folder structure is </p>
  
  <pre><code>src
   --main
     --resources
       application.properties
     -- java
  
  
  Webcontent
  --WEB-INF
    spring-servelet.xml
    spring-security.xml
    --jsp
    --lib
  </code></pre>
  
  <p>I build this project using POM.xml</p>
  
  <p>Please let me know if you need more information</p>