I have my project deployed in JBoss EAP 6.1 in a WAR folder. In the WEB-INF file, in the WAR folder, I have a lib folder which contains all my libraries, in this file is a jar that contains backing beans that I need to access with prettyfaces annotations inside.
So… my XHTML files live in the WAR file root directory but the backing beans which use prettyfaces for the url-rewriting live in the jar file in the lib directory. It seems like when I do a return pretty:somexhtmlpage in my navigation backing bean prettyfaces can not find the correct backing beans which lives in the jar file in my lib directory. Is there something I am doing wrong? Can this actually be done? If I move all those backing beans out of the jar and into the war everything works normally, however that really isn’t an option. Do you have any ideas? Can you explain to me how Prettyfaces gathers all the annotations in the backing beans and does the URL-rewriting?
you have to tell PrettyFaces, that it should also scan the lib folder of your WAR archive for annotations. This isn’t done by default for performance reasons. Setting this parameter in your web.xml should do the trick: