Spring MVC project missing images & styles when deploying in Eclipse to Tomcat
<p>I have a Spring MVC project in Eclipse. Maven packages it as a WAR and then I have it deployed to Tomcat through Eclipse. The issue I am running into is that the <code>/images</code>, <code>/styles</code> and the <code>/js</code> folders in the /webapp folder are not coming through. The page will generate and the Spring MVC functionality works (calls the Controller, etc). However, none of the styling will appear. I would greatly appreciate any help getting this to work.</p>

<p><strong>web.xml</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
    &lt;display-name&gt;Some Project&lt;/display-name&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;webAppRootKey&lt;/param-name&gt;
        &lt;param-value&gt;some-project.root&lt;/param-value&gt;
    &lt;/context-param&gt;

    &lt;listener&gt;
        &lt;listener-class&gt;org.springframework.web.util.Log4jConfigListener&lt;/listener-class&gt;
    &lt;/listener&gt;

    &lt;servlet&gt;
        &lt;servlet-name&gt;some-project&lt;/servlet-name&gt;
        &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;

    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;some-project&lt;/servlet-name&gt;
        &lt;url-pattern&gt;/&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;

    &lt;session-config&gt;
        &lt;session-timeout&gt;60&lt;/session-timeout&gt;
    &lt;/session-config&gt;
&lt;/web-app&gt;
</code></pre>

<p><strong>some-project-servlet.xml</strong></p>

<pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans     
                           http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                           http://www.springframework.org/schema/context 
                           http://www.springframework.org/schema/context/spring-context-4.0.xsd"&gt;

    &lt;context:component-scan base-package="my.com.project.controllers" /&gt;

    &lt;bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"&gt;
        &lt;property name="basename" value="classpath:messages" /&gt;
        &lt;property name="cacheSeconds" value="60" /&gt;
    &lt;/bean&gt;

   &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
        &lt;property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /&gt;
        &lt;property name="prefix" value="/WEB-INF/views/" /&gt;
        &lt;property name="suffix" value=".jsp" /&gt;
    &lt;/bean&gt;

    &lt;!-- Need this to handle multipart files --&gt;
    &lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" /&gt;

    &lt;bean class="my.com.project.validators.SomeValidator" /&gt;
    &lt;bean class="my.com.project.validators.OtherValidator" /&gt;
&lt;/beans&gt;
</code></pre>

<p><strong>pom.xml (parts of it</strong></p>

<pre><code>...
&lt;packaging&gt;war&lt;/packaging&gt;
...
&lt;!-- The Build --&gt;
&lt;build&gt;
    &lt;plugins&gt;
        &lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
            &lt;version&gt;3.5.1&lt;/version&gt;
            &lt;configuration&gt;
                &lt;source&gt;1.8&lt;/source&gt;
                &lt;target&gt;1.8&lt;/target&gt;
            &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.6&lt;/version&gt;
            &lt;configuration&gt;
                &lt;warName&gt;some-project&lt;/warName&gt;
                &lt;archive&gt;
                    &lt;manifest&gt;
                        &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                    &lt;/manifest&gt;
                &lt;/archive&gt;
            &lt;/configuration&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
&lt;/build&gt;
...
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
    &lt;version&gt;4.2.5.RELEASE&lt;/version&gt;
&lt;/dependency&gt;
&lt;!-- using Hibernate 4.3.11.Final --&gt;
</code></pre>

<p><strong>JSP</strong></p>

<pre><code>&lt;link rel="stylesheet" type="text/css" media="all" href="/styles/screen.css" /&gt;
&lt;link rel="stylesheet" type="text/css" media="print" href="/styles/print.css" /&gt;
&lt;link rel="stylesheet" type="text/css" href="/styles/jquery/jquery-ui.css"&gt;
&lt;link rel="stylesheet" type="text/css" href="/styles/roper-center.css"&gt;
&lt;link rel="stylesheet" type="text/css" href="/styles/font-awesome-4.5.0/css/font-awesome.css"&gt;

&lt;script src="js/modernizr.js"&gt;&lt;/script&gt;
&lt;script src="js/framework/iws.js"&gt;&lt;/script&gt;
&lt;script src="js/sorttable.js"&gt;&lt;/script&gt;
&lt;script src="js/jquery/jquery-1.12.2.min.js"&gt;&lt;/script&gt;
&lt;script src="js/jquery/external/jquery/jquery.js"&gt;&lt;/script&gt;
&lt;script src="js/jquery/jquery-ui.js"&gt;&lt;/script&gt;
&lt;script src="js/jquery/jquery.autotab.js"&gt;&lt;/script&gt;
</code></pre>

<p>As you can see above, I tried putting a <code>/</code> before the styles and did not put them in the "js" part. I viewed the page source of the page and clicked on the link for both and Tomcat comes back saying it can't find either.</p>

<p>If I look into the deployment folder (/opt/apache-tomcat-8.0.32/webapps/some-project), I see the following folders:</p>

<blockquote>
  <p>META-INF <br />
  WEB-INF <br />
  images <br />
  js <br />
  styles</p>
</blockquote>

<p>And here is my <code>webapp</code> folder in Eclipse:</p>

<p><a href="https://i.stack.imgur.com/6y2Ug.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6y2Ug.png" alt="webapps folder list"></a></p>

<p>And in case, here is my Deployment Assembly</p>

<p><a href="https://i.stack.imgur.com/MSk3y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MSk3y.png" alt="enter image description here"></a></p>