Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is the faces-config modularized

 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I would like to know if the faces-config.xml be modularized like we do it struts. For example in the struts-xxx.xml, I can say that it extends from the parent. Is there anyhting that I can do with the faces-config as well?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18163
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, and I've seen it done (badly). You can specify one or more faces-config files in your web.xml, including overriding the requirement that any of them even be named "faces-config.xml" to begin with.

If you've got a very large, but modular app, it's a good option to have. Not my fault that the only time I've seen it used was by people who didn't know how to modularize.
 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web app which is built using Maven. I have modularized them into service and web projects. In the web projects itself, I have different sub modules with each of those modules having their own struts-xxx.xml configuration. I'm thinking if I could do something similiar with faces-config.
 
Akaine Harga
Ranch Hand
Posts: 99
Java MyEclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in web.xml you write:

and respective xml's in the folders. On compilation all these will be read as one faces config, so don't duplicate entries.
 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. Just thinking if there is a Spring plugin for JSF. My app middlte tier is realized using Spring. Currently I have planned to use Struts, but considering to migrate to JSF. Hope it gets better!
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18163
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jothi Shankar Kumar wrote:Thanks for the reply. Just thinking if there is a Spring plugin for JSF. My app middlte tier is realized using Spring. Currently I have planned to use Struts, but considering to migrate to JSF. Hope it gets better!


In 2001, I wrote an introduction to Struts as an article in Java Pro magazine. By 2006, I'd given up on Struts for JSF. Struts might possibly be capable of higher throughput, but JSF is more architecturally simple. So simple, in fact that one of the biggest problems I see with it is people trying to concoct complex solutions to problems that JSF can do simply.
 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:
Jothi Shankar Kumar wrote:Thanks for the reply. Just thinking if there is a Spring plugin for JSF. My app middlte tier is realized using Spring. Currently I have planned to use Struts, but considering to migrate to JSF. Hope it gets better!


In 2001, I wrote an introduction to Struts as an article in Java Pro magazine. By 2006, I'd given up on Struts for JSF. Struts might possibly be capable of higher throughput, but JSF is more architecturally simple. So simple, in fact that one of the biggest problems I see with it is people trying to concoct complex solutions to problems that JSF can do simply.


Do you mean to say integrating JSF with Spring will end up as a complex thing to be done?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18163
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jothi Shankar Kumar wrote:

Do you mean to say integrating JSF with Spring will end up as a complex thing to be done?


I've been doing it for years. My persistence layer is Spring, my presentation layer is JSF. There's a very useful little component that connects the two so that Spring Beans can be injected into JSF managed beans.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic