0

I have a project in jsf that is shared by multiple projects. The structure of the project is the same as that mentioned in the answer to the question Structure for multiple JSF projects with shared code

The someTemplate.xhtml mentioned in that structure has a outputStyleSheet statement immediately after the opening

<h:body>

tag :

<h:outputStylesheet name="css/some.css" library="common"></h:outputStylesheet>

The shared project is packaged into shared.jar and is placed into the WEB-INF/lib directory of a client project.

When I make a client file (as part of a client project) that uses the someTemplate.xhtml as a template using

<ui:composition template="/common/someTemplate.xhtml">

the file some.css is not recognized. None of the styles mentioned in some.css take effect.

When I look into the source of the page that is generated, I see these two lines:

<link type="text/css" rel="stylesheet" href="/javax.faces.resource/some.css.jsf" />

<link type="text/css" rel="stylesheet" href="RES_NOT_FOUND" />

I have tried many different combinations of file names and locations for the css file, and the template file as well. But the problem remains the same. In all cases, the styles in some.css were not recognized. I am also curious as to why it says 'RES_NOT_FOUND' in the href. Any help will be highly appreciated.

Thanks

Mahendra

Community
  • 1
  • 1
Mahendra
  • 33
  • 1
  • 7

0 Answers0