2
votes

I am experiencing a problem with a composite component. I'm not quite sure if it's a bug in one of the used libraries or just my own ignorance of the matter. If I put the component bar.xhtml files in

WebContent/resources/foo/bar.xhtml

everything is working as intended. But if I put them in

WebContent/resources/subfolder/foo/bar.xhtml

they are just not displayed, and I get the message:

The page /login.xhtml declares namespace http://java.sun.com/jsf/composite/subfolder/foo and uses the tag foo:bar , but no TagLibrary associated to namespace.

I suspect it has something to do with the unmapped resource handler from Omnifaces, and is maybe just a parameter I'm not able to figure out. Maybe someone can give me a hint here?

I'm using (amongst others):

  • Apache MyFaces 2.2.4
  • Omnifaces 1.8.1
  • Primefaces 5.0
  • Tomcat 8.0.12

Edit 2 Moved the answer to a reply

1
Just disable the UnmappedResourceHandler to exclude it from being the cause. - BalusC
Hey, thanks for the reply. I was pretty sure I tried that yesterday. But now it didn't do anything to the cause. However, I found the solution (which I will edit into the question). Sometimes it helps to just go to sleep and check the problem again the next day. - MCMLXXXII
That's great. But you should not put the answer in the Question, rather post it as an Answer. - BalusC

1 Answers

3
votes

Ok - after sleeping one night over it, I found out that this had nothing to with Omnifaces, but with a change in MyFaces since 2.1.6. Since then, you have to put the following in your web.xml:

<context-param>
    <param-name>org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME</param-name>
    <param-value>true</param-value>
</context-param>

(found here )