title: using css file with tiles
body: <p>I m using a css file with tiles but it is not working.</p>
  
  <p>my tiles.xml is:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;tiles-definitions&gt;
      &lt;definition name="baseLayout" template="/jsps/mail/mailbase.jsp"&gt;
          &lt;put-attribute name="css" value="/css/mail.css" type="string" /&gt; 
          &lt;put-attribute name="menu" value="/jsps/mail/menu.jsp"/&gt;
         &lt;put-attribute name="body" value=""/&gt;
      &lt;/definition&gt;
      &lt;definition name="inbox.tile" extends="baseLayout"&gt;
          &lt;put-attribute name="css" value="/css/mail.css" type="string" /&gt;
          &lt;put-attribute name="body" value="/jsps/mail/inbox.jsp"/&gt;
      &lt;/definition&gt;
      &lt;definition name="msgdetail.tile" extends="baseLayout"&gt;
          &lt;put-attribute name="body" value="/jsps/mail/msgDetails.jsp"/&gt;
      &lt;/definition&gt;
      &lt;definition name="compose.tile" extends="baseLayout"&gt;
          &lt;put-attribute name="body" value="/jsps/mail/compose.jsp"/&gt;
      &lt;/definition&gt;
      &lt;definition name="msgsent.tile" extends="baseLayout"&gt;
          &lt;put-attribute name="body" value="/jsps/mail/msg_sent.html"/&gt;
      &lt;/definition&gt;
  &lt;/tiles-definitions&gt;
  </code></pre>
  
  <p>and my jsp is:</p>
  
  <pre><code>  &lt;%@ page contentType="text/html;charset=UTF-8"%&gt;
      &lt;%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%&gt;
      &lt;%@ taglib prefix="s" uri="/struts-tags"%&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 type="text/css" rel="stylesheet"  href="&lt;tiles:getAsString name='css'/&gt;"/&gt;**
      &lt;/head&gt;
     &lt;body&gt;
  &lt;div id="left"&gt;&lt;tiles:insertAttribute  name="menu"/&gt;&lt;/div&gt;
  &lt;div id="right"&gt;&lt;tiles:insertAttribute  name="body"/&gt;&lt;/div&gt; 
     &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>
  
  <p>My CSS file "mail.css" lies in <strong>tomcat_root/web-app-name/css/mail.css</strong></p>
  
  <p>and jsp is in  <strong>tomcat_root/web-app-name/jsps/mailbase.jsp</strong></p>
  
  <p>control flow is like:</p>
  
  <p>request---------->inboxaction(struts2.xml)------------------>inbox.tile (tiles.xml)</p>