I'm following BalusC's excellent answer here, which goes through the steps of packaging up JSF content into a jar so it can be shared across multiple apps. This includes specifying common css files. I'd like to put my primefaces theme.css
in the jar, however primefaces is quite prescriptive in how to include the theme. ie. it should be in a folder like (resources/primefaces-mytheme/theme.css)
, then the web.xml should include:
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>mytheme</param-value>
</context-param>
If I put my theme into the jar like so (for example)...
CommonWebProject
|-- META-INF
| |-- resources
| | -- common
| | |-- css
| | | -- theme.css
...what should the context param then look like in a project that uses the jar? (or maybe there should be a web.xml file in the jar itself?)
Edit: An alternative solution would be to somehow stop primefaces from inserting it's default theme. Then I could simply insert my own theme in the normal way in my template's header.