I'm using Tomcat 7 and want to serve a simple login screen and afterwards direct the user to a Spring MVC / EXT-JS based portal. In the web.xml I defined access to the spring area like this:
<servlet>
<servlet-name>portal-web</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/portal-web-servlet-app-ctx.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>portal-web</servlet-name>
<url-pattern>/portal/*</url-pattern>
</servlet-mapping>
And this part works fine (URLs to /portal/* are directed correctly). However my static login page is now not served and /index.html and /css/*.css calls return a 404 error. I tried adding the following to my web.xml:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
And that did give me access to /index.html, but the css files are still not accessible.
Here is my project layout:
-src
-main
+extjs
+java
-resources
hibernate.cfg.xml
log4j2.xml
-webapp
-css
first.css
second.css
+WEB-INF
index.html
Why isn't tomcat serving the static files under webapp/css?
Thanks!