1

Here is my Facelet template location : WAR/WEB-INF/lib/common.jar/META-INF/resources/m0/template.xhtml.

It throws the following exception when the war, and the jar in it, are deployed as exploded folders : Invalid path : /m0/template.xhtml

It works when the war and the jar is deployed as real archives, or when they are exploded in an EAR, but not in a simple WAR.

Additional information :

  • The problem is the same on Windows and Linux.
  • The problem occurs only in an exploded WAR where common.jar is an exploded folder under WEB-INF/lib.
  • The problem does not occur in an exploded EAR where common.jar is a folder under EAR/lib.

I've read here that facelets templates are resolved by ExternalContext#getResource() which delegates to ServletContext#getResource() to load resources from /WEB-INF/lib/*.jar!/META-INF/resources. Does it works only with real jars ? Or should I try another implementation of the servlet API ? I'm using Glassfish 3.1.2 with Mojarra 2.1.6.

I want to use an exploded deployment during development since it is much faster to test changes.

Thank you for your help.

Community
  • 1
  • 1
  • Here is the stack trace : `javax.faces.view.facelets.TagAttributeException: /help/overview/overview.xhtml @8,32 Invalid path : /m0/template.xhtml at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:160) at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86) at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152) ...` – Pierre Crochet May 03 '13 at 13:37
  • As I told, the workaround is to include the WAR in an EAR. – Pierre Crochet May 17 '13 at 11:17

0 Answers0