With help of the Ajax4JSF filter you can serve resources that are in the classpath of your application or in jar file.
Serving resources with standard components
<h:graphicImage src="resources:///org/myapp/resources/images/button.jpg" />
Serving CSS files
You could serve css files using a4j:loadStyle component. The loaded css file will be included in the
If you have component that uses HtmlLoadScript/HtmlLoadStyle as a child you do not need to create the child every time the component is rendered. First time you create the component add the child component that loads resources and store a variable in the request scope and put a logic code not to add the childs if than request variable exists.