title: Stylesheets not getting sent to browser
body: <p>Stylesheets not getting sent to browser.  </p>
  
  <p>Windows 7
  Eclipse 4.5.2 (Dynamic Web project)
  tomcat 7.0.69    (instance is local to workstation)</p>
  
  <p>[Eclipse workspace screen capture][1]</p>
  
  <p>The web site is backed with servlets. I have tried...
  -- XHTML </p>
  
  <pre><code>out.println("&lt;?xml-stylesheet href="/style/mystyle.css" type="text/css"?&gt;");
  </code></pre>
  
  <p>-- XHTML </p>
  
  <pre><code>out.println("&lt;?xml-stylesheet href="style/mystyle.css" type="text/css"?&gt;");
  </code></pre>
  
  <p>-- Changing from XHTML to HTML</p>
  
  <p>-- Using the </p>
  
  <pre><code>out.println("&lt;base href=' http://localhost:8080/My_Website03/'&gt;");
  
  *(This method is not scalable to a server, I know.  Just trying things.)*
  </code></pre>
  
  <p>-- Using request.getContextPath()</p>
  
  <pre><code>out.println("&lt;link rel='stylesheet' href='" + request.getContextPath()
          + "/style/style.css' type='text/css' /&gt;");
  out.println("&lt;link rel='stylesheet' href='" + request.getContextPath()
          + "/style/blue.css' type='text/css' /&gt;");
  </code></pre>
  
  <p>-- Using no leading forward slash</p>
  
  <pre><code>out.println("&lt;link rel='stylesheet' href='style/style.css' type='text/css' /&gt;");
  
  out.println("&lt;link rel='stylesheet' href='style/blue.css' type='text/css' /&gt;");
  </code></pre>
  
  <p>-- Using a leading forward slash</p>
  
  <pre><code>out.println("&lt;link rel='stylesheet' href='/style/style.css' type='text/css' /&gt;");
  
  out.println("&lt;link rel='stylesheet' href='/style/blue.css' type='text/css' /&gt;");
  </code></pre>
  
  <p>-- Using a leading dot slash</p>
  
  <pre><code>out.println("&lt;link rel='stylesheet' href='./style/style.css' type='text/css' /&gt;");
  
  out.println("&lt;link rel='stylesheet' href='./style/blue.css' type='text/css' /&gt;");
  </code></pre>
  
  <p>-- Using a leading double dot slash</p>
  
  <pre><code>out.println("&lt;link rel='stylesheet' href='../style/style.css' type='text/css' /&gt;");
  
  out.println("&lt;link rel='stylesheet' href='../style/blue.css' type='text/css' /&gt;");
  </code></pre>
  
  <p>And nothing works to get the .css files over to the browser.</p>
  
  <hr>
  
  <p>In order to get servlets working the logging issue needed to be fixed and Eclipse had to be given control of the TomEE-Plume conf.  I don't know why but fixing just one of the two would not correct the problem.  My skills in Eclipse &amp; TomEE are to weak to understand why.</p>
  
  <p>Fixing the logging issue is written up on this wiki page. More information on: <a href="http://wiki.eclipse.org/WTP_Tomcat_FAQ#How_do_I_enable_the_JULI_logging_in_a_Tomcat_5.5_Server_instance.3F" rel="nofollow noreferrer">http://wiki.eclipse.org/WTP_Tomcat_FAQ#How_do_I_enable_the_JULI_logging_in_a_Tomcat_5.5_Server_instance.3F</a> Even though the wiki section is written for Tomcat 5.5 it still applies to Tomcat 7.0.69.  Long time for a bug to not get fixed if you ask me.  </p>
  
  <p>This <a href="http://tomee.apache.org/tomee-and-eclipse.html" rel="nofollow noreferrer">http://tomee.apache.org/tomee-and-eclipse.html</a> page, in the "Advanced installation"   section, step 9, gives the impression that configuring for Eclipse to take control is optional.  As said above, this step is not optional to get TomEE-Plume to work for servlets.  I had to let Eclipse take control of the TomEE installation.  </p>
  
  <p>One more note on step 9.  The instruction say "Use Workspace Metadata" but the option needed is called "Add External Web Module..." not "Use Workspace Metadata".</p>
  
  <p>There is one last discrepancy to mention.  There is no /webapps/tomee directory anymore.  I guess this changed since the documentation was written.  I used "\host-manager" instead.  I hope this does not come back to bite me latter.</p>
  
  <p>O, yea, one other thing, there is no "Save" button on the Web Modules or Overview pages.  Do a <kbd>CTL</kbd>+<kbd>S</kbd> to save the changes.</p>
  
  <p>Hope that helps others.</p>