title: including style sheet in a jsp page with Spring MVC
body: <p>I am having trouble linking to a style sheet from a jsp page. I believe it has something to do with my directory structure which is:</p>
  
  <pre><code>WEB-INF
    |-- css
    |    |-- main.css
    |
    |-- jsp
         |-- login.jsp
  </code></pre>
  
  <p>I have tried various forms of the standard html link tag such as:</p>
  
  <pre><code>&lt;link href="css/main.css" rel="stylesheet" type="text/css" media="screen" /&gt;
  &lt;link href="main.css" rel="stylesheet" type="text/css" media="screen" /&gt;
  &lt;link href="WEB-INF/css/main.css" rel="stylesheet" type="text/css" media="screen" /&gt;
  </code></pre>
  
  <p>I have also tried including the css file in the jsp folder and linking to it directly. Nothing works. When I view the source after deployment, and try to access the CSS file directly, it's not there, but this is no surprise to me since it is in the WEB-INF directory.</p>
  
  <p>I have also verified that it is getting deployed with the rest of the application. The jsp source is:  </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Login&lt;/title&gt;
  
  &lt;link href="css/main.css" rel="stylesheet" type="text/css" media="screen" /&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;div id="wrapper"&gt;
  &lt;div id="header"&gt;
  &lt;div id="logout"&gt;&amp;nbsp;&lt;/div&gt;
  &lt;h1&gt;Login&lt;/h1&gt;
  &lt;/div&gt;
  &lt;div id="content" class="content"&gt;
    &lt;form action="" method="post" name="login-form"&gt;
      &lt;fieldset&gt;
        &lt;legend&gt;Login&lt;/legend&gt;
        &lt;table border="0" align="center"&gt;
          &lt;tr&gt;
            &lt;td&gt;&lt;label&gt;User Name:&lt;/label&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="userName" /&gt;&lt;br&gt;&lt;br&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;label&gt;Password:&lt;/label&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="password" /&gt;&lt;br&gt;&lt;br&gt;&lt;/td&gt;
           &lt;/tr&gt;
          &lt;/table&gt;
        &lt;/fieldset&gt;
        &lt;div class="buttons"&gt;
          &lt;input type="submit" name="submit" value="Login" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
          &lt;input type="button" name="cancel" value="Cancel" /&gt;
        &lt;/div&gt;
      &lt;/form&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Thanks!</p>