2

We have problem with loading template.xhtml from .jar file in web app.

We use GlassFish Server 4.1, Netbeans 8.0.1. We are make Maven Enterprise Application project with moduls.

Some of modula are WebApps (WAR), and we would like u share contracts between them. We have one common.JAR with contract templates in META-INF\contracts. Every WAR have common.JAR in \WEB-INF\lib. (Classic example form tutorials)

In JSF 2.2 specification we find that jar file does not need additional files.

But, we got: javax.faces.view.facelets.TagAttributeException: /index.xhtml @8,48 Invalid path : /template.xhtml

When we try to load images from common.JAR\META-INF\resources\image.jpg it is ok.

We use pom.xml and we have this dependencis:

<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>

If anyone has an idea what could be wrong?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Igor
  • 381
  • 3
  • 17
  • After extensive research, we found that the EAR file is OK and after it is placed on the server everything works ok. But the problem arises when we BUILD Enterprise project from NetBeans and RUN EAR module. In this case, the JSF can not load resources from a JAR file. After running the EAR, we restart Glassfish servet and everything works OK - JSF load template from JAR. We assume that the problem in packing process or autodeploy process with Maven and NetBeans. – Igor Oct 01 '14 at 06:52

0 Answers0