25.6.2. Declarative CSS Style injection

If a portlet needs a CSS style sheet to be injected via a link tag in the page header, it can do so by providing the context relative URI to the file in the jboss-portlet.xml descriptor, like:
               <portlet-app>
  <portlet>
    <portlet-name>HeaderContentPortlet</portlet-name>
    <header-content>
      <link rel="stylesheet" type="text/css" href="/portlet-styles/HeaderContent.css"
                                       title="" media="screen" />
    </header-content>
  </portlet>
</portlet-app>
This functionality, just like the previously described header content injection, requires the layout JSP to add the "headerContent" JSP tag (see example above). One thing to note here is the order of the tags. If the headerContent tag is placed after the theme tag, it will allow portlet injected CSS files to overwrite the theme's behavior, making this feature even more powerful!