• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is the faces-config modularized

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 99
MyEclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic