I am trying to decouple application-layer code from view layer html, css, js in a JSF 2.0 web application.
The view layer of the application will be a deployed WAR file with the standard structure.
The java code will be in a Weblogic deployed library (referenced by the war in WEB-INF/weblogic.xml). This will contain only the class files as well as many required jars.
I don't want the people working on the view layer to have direct connection to the application layer. Can I include specifications normally from the faces-config.xml of the application inside the referenced library's faces-config.xml instead? These include: exception-handler-factory, resource bundle references, el-resolvers, listeners, render-kit, etc.
Application Structure -App-Layer Library -META-INF -faces-config.xml??? -WEB-INF -classes -lib (jars here) -web.xml -View-Layer Application -META-INF -WEB-INF -faces-config.xml -web.xml -weblogic.xml -weblogic-application.xml -Other folders
Sorry if this is not clear enough, my first question on Stack Overflow! Please feel free to let me know if I can clarify anything.
Yes, it's possible.
You can have an app library for commons, configuration and java code separate of the view-layer. In this jar (library) you put all that you need at the JSF config file, (
faces-config.xml
) located insrc/META-INF/faces-config.xml
. In my case i have exception-handler-factory, resource bundle references, el-resolvers, listeners in this config file, and don't have any problem in weblogic.But, there are some issues to take in mind. For example, override a 3rd part, renderer or component.
I hope, that resolve some of yours doubts...