1

Can anyone tell me if it is possible to keep managed beans in separate .xsp-config configuration files? And if yes than how to do this? I have tried and it only worked if I put them into faces-config.xml file.

W_K
  • 868
  • 4
  • 9

4 Answers4

3

If you want to split your bean definitions into multiple configuration files, you'll need to create an OSGi plugin. XSP libraries can contain more than one faces-config file (and you can name them whatever you want, because you specify in the library class which XML files contain faces-config definitions). But in an NSF, you're limited to just the auto-generated faces-config.xml file.

Tim Tripcony
  • 8,056
  • 1
  • 23
  • 34
2

Yes, Managed beans must be defined in the faces-config.xml file.

For a good reference on all the different options within faces-config and xsp-config take a look at this website. It describes the format of pretty much everything you might ever want to add to a faces-config or xsp-config and a brief description of the options.

keithstric
  • 1,053
  • 1
  • 11
  • 21
1

As far as I know they have to be in the faces-config.xml

stwissel
  • 20,110
  • 6
  • 54
  • 101
0

faces-config is a JSF implementation, you should check out the JSF specification for this, there are even some good post in this forum like this one: JSF faces config file outside WEB-INF?

Community
  • 1
  • 1
Thomas Adrian
  • 3,543
  • 6
  • 32
  • 62