title: Spring Framework Project not loading?
body: <p>I have been working with the Spring framework for a few days trying to set up a project, based off of something like <a href="http://websystique.com/springmvc/spring-4-mvc-and-hibernate4-integration-example-using-annotations/" rel="nofollow noreferrer">this tutorial</a>. </p>
  
  <p>Unfortunately, when i deploy the project using Tomcat, I get a screen that looks something like this: </p>
  
  <p><a href="https://i.stack.imgur.com/UHwRf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UHwRf.png" alt="Tomcat 404 error"></a></p>
  
  <p>I'm not really sure to go from here. I've checked the web.xml and any other relevant .xml files that would maybe affect the error, but I can't see an error. Below I will post my <code>web.xml</code> and <code>spring-config.xml</code> files.</p>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   
         http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"  
   version="2.5"&gt;  
  
   &lt;display-name&gt;Campaign Spring V2&lt;/display-name&gt;  
  
   &lt;servlet&gt;  
    &lt;servlet-name&gt;mvc-dispatcher&lt;/servlet-name&gt;  
    &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;  
    &lt;init-param&gt;  
     &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;  
     &lt;param-value&gt;/WEB-INF/spring-config.xml&lt;/param-value&gt;  
    &lt;/init-param&gt;  
    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;  
   &lt;/servlet&gt;  
  
      &lt;servlet-mapping&gt;  
        &lt;servlet-name&gt;mvc-dispatcher&lt;/servlet-name&gt;  
        &lt;url-pattern&gt;/&lt;/url-pattern&gt;  
       &lt;/servlet-mapping&gt;  
  
      &lt;/web-app&gt;  
  </code></pre>
  
  <p><strong>spring_config.xml</strong></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" xmlns:context="http://www.springframework.org/schema/context"
      xmlns:util="http://www.springframework.org/schema/util" xmlns:mvc="http://www.springframework.org/schema/mvc"
      xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd  
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd  
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd  
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"&gt;
  
      &lt;context:component-scan base-package="com.bridge.campaignspring.controller" /&gt;
  
      &lt;context:property-placeholder location="classpath:application.properties" /&gt;
  
      &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
      &lt;mvc:annotation-driven /&gt;
  
      &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
          &lt;property name="driverClassName" value="${database.driver}" /&gt;
          &lt;property name="url" value="${database.url}" /&gt;
          &lt;property name="username" value="${database.user}" /&gt;
          &lt;property name="password" value="${database.password}" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource" /&gt;
          &lt;property name="annotatedClasses"&gt;
              &lt;list&gt;
                  &lt;value&gt;com.bridge.campaignspring.Campaign&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
          &lt;property name="hibernateProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQL5Dialect&lt;/prop&gt;
                  &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="txManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
          &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="persistenceExceptionTranslationPostProcessor" class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" /&gt;
  
      &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix" value="/WEB-INF/views" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="CampaignDao" class="com.bridge.campaignspring.dao.CampaignDAOImpl" /&gt;
      &lt;bean id="CampaignService" class="com.bridge.campaignspring.service.CampaignServiceImpl" /&gt;
  
  &lt;/beans&gt;  
  </code></pre>
  
  <p>If need be, I can post the project to GitHub to see if there is an even larger flaw that could be found in the code. Also, if any other parts of the project need to be posted I will update the OP to display anything. Thanks!</p>
  
  <p><strong>EDIT:</strong> <a href="http://localhost/" rel="nofollow noreferrer">http://localhost/</a> does not load either, I was incorrect with my previous statement.</p>
  
  <p><strong>EDIT2:</strong> Here is a link to the project on <a href="https://github.com/daperez/CampaignSpringV2" rel="nofollow noreferrer">GitHub</a>.</p>
  
  <p><strong>EDIT3:</strong> After going through the Spring tutorial again this was resolved!</p>