I have started a Spring-JSF application. I've broken down this application into some separated modules that should be archived and deployed separately as well. For example:
- A main module which handles the login, page templates, loading and showing the menu and so on.
- Another module handles the business specific views and logic, for instance: Employee.xhtml
So after the user passes the authentication, in the index page, he/she want to navigate to Employee.xhtml page which is in the second module (So it is deployed on tomcat in the separate war file).
In this situation, when I deploy both WAR files on tomcat, main application cannot find the Employee.xhtml in the second WAR file, or something like this. I'm getting this error:
java.io.FileNotFoundException: Facelet /pages/Employee.xhtml not found at: jndi:/localhost/pages/Employee.xhtml
org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory._createFacelet(DefaultFaceletFactory.java:387)
org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.access$000(DefaultFaceletFactory.java:57)
org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:124)
org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:121)
org.apache.myfaces.view.facelets.impl.FaceletCacheImpl.getFacelet(FaceletCacheImpl.java:84)
org.apache.myfaces.view.facelets.impl.FaceletCacheImpl.getFacelet(FaceletCacheImpl.java:51)
org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:278)
org.apache.myfaces.view.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:574)
org.apache.myfaces.view.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:553)
org.apache.myfaces.view.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:240)
org.apache.myfaces.view.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:228)
javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:55)
...
Also I'm not navigating between these two applications. That is I'm trying to include a page from second war file in the center area of a page in the first main war file.
Any ideas?! Any help would be appreciated.