title: JSP can not read CSS because of web.xml
body: <p>This is not a theory. I have proof. I've been on this problem for almost a day. My jsp seem to can't read/find CSS. I've done a lot of solutions but nothing work. Until I decide maybe one of my files is causing it. Then I do trial and error. Deleting file to see which one causes it.</p>
  
  <p>Until i'm in web.xml. I deleted web.xml, run the JSP and boom it read the CSS. I copy back the web.xml and then again my css can't be read. </p>
  
  <p>By the way i'm using spring mvc, and my project is maven web application.</p>
  
  <p>below are my codes:</p>
  
  <p>jsp(css link part):</p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href="../../css/logincss.css"&gt;
  </code></pre>
  
  <p>web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
       version="3.1"&gt;
      &lt;session-config&gt;
          &lt;session-timeout&gt;
              30 
          &lt;/session-timeout&gt;
      &lt;/session-config&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;DpServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              org.springframework.web.servlet.DispatcherServlet
          &lt;/servlet-class&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;DpServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>I think the error is that when i'm requesting a css file, the request goes to dispatcherservlet so that is so error. How can I fix my problem? Please I need solution i've been on this problem for over a DAY! Thanks in advance.</p>