2

I have a JSF application that I'd like to split up into modules. Splitting up the Java code is easy...splitting up the JSF pages (which can reference one another) is not.

I think BalusC's answer in this post is leading me down the right track:

How to create a modular JSF 2.0 application?

However, I'm having trouble applying it to my Netbeans environment. The "Web Application" project type does not allow you to include other "Web Application" projects in it because it only expects projects that create jars. Even if you rename the .war to a .jar it still doesn't like it.

If I use a "Java Application" project type to manage my web project, then the IDE does not provide me with all the great bells and whistles associated with the web project type (creation of JSF scoped beans, etc).

If someone has any experience with this, I'd certainly appreciate some advice.

Community
  • 1
  • 1
wsaxton
  • 1,030
  • 15
  • 34

1 Answers1

0

We got the same situation here in my work and we decided to create a Java Application Project (not a web) with all beans and taglibs (.xhtml).

So, with a faces-config.xml in META-INF folder and JSF 2.0 in its classpath we can create beans using the @ManagedBean annotation.

Now our Web Application can include this project in its classpath and Netbeans sees all beans.

It's possible to insert .xhtml packed in the Java Application Project via "ui:include" or custom taglibs like this.

Adriano Castro
  • 1,411
  • 4
  • 19
  • 33