title: .ttf files are not served to CSS from JSP
body: <p>I created a Dynamic Web Project in Eclipse and wanted to use some font faces in the JSP files. I added a <code>.css</code> file to the project in Eclipse and  put the following code in the file:</p>
  <pre><code>@font-face{
  font-family: &quot;Font Name&quot;;
  src: url(&quot;FontName.ttf&quot;) format(&quot;truetype&quot;);
  }
  </code></pre>
  <p>I put the <code>FontName.ttf</code> file manually (NOT by adding it using Eclipse) in the <code>WebContent</code> folder. <code>.css</code> file also lies in the same folder.</p>
  <p><strong>Problem:</strong></p>
  <p>I am using Tomcat server and whenever the browser requests this file, server responds with <code>404 Resource Not Found</code> . Why does this occur?</p>
  <p><strong>Checks done:</strong></p>
  <p>The <code>web.xml</code> in of Tomcat contains appropriate mime types to handle the <code>.ttf</code> files. Specifically, these lines are present in this file:</p>
  <pre><code>  &lt;mime-mapping&gt;
       &lt;extension&gt;ttf&lt;/extension&gt;
        &lt;mime-type&gt;application/x-font-ttf&lt;/mime-type&gt;
    &lt;/mime-mapping&gt;
  </code></pre>
  <ol start="2">
  <li><p>I also put the <code>FontName.ttf</code> file in the main project directory. That was also not working.</p>
  </li>
  <li><p>I had thought that the problem was caused because of not adding the <code>.ttf</code> through Eclipse? If this is indeed the case, how can I add this file to the project using Eclipse? I could not find an appropriate way.</p>
  </li>
  </ol>