title: How can I get my JSP to locate my CSS file within Spring MVC?
body: <p>I am relatively new to web development, and I am trying to develop a web application using Spring MVC 3.0.5 on WebLogic 10.3.4.</p>
  
  <p>I'd like my JSPs to use external CSS files.  For example, I have a JSP file with the following:</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  
  &lt;LINK href="${pageContext.request.contextPath}/resources/css/ptostyles.css" rel="stylesheet" type="text/css"&gt;
  
  &lt;title&gt;Register&lt;/title&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>Unfortunately, the CSS file doesn't seem to get loaded.  I have tried putting it in various places.  The current directory structure looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/IyAOj.png" alt="enter image description here"></p>
  
  <p>Relevant portions of my web.xml include:</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;springDispatcher&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/config/spring-context.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;springDispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;Resource Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.ResourceServlet&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;Resource Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;WebContent/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>Any suggestions, including debugging strategies would be much appreciated!</p>