aspose file tools*
The moose likes JSF and the fly likes Is the faces-config modularized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Is the faces-config modularized" Watch "Is the faces-config modularized" New topic
Author

Is the faces-config modularized

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9521
    
    2

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?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9521
    
    2

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

Joined: Nov 03, 2009
Posts: 80

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.


Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
willCodeForFood("Java,PHP,C#,XML,VBS,XHTML,CSS,JavaScript,SQL"); //always looking for job opportunities in AU/NZ/US/CA/Europe :P
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9521
    
    2

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

Joined: Jun 25, 2001
Posts: 16250
    
  21

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

Joined: Sep 26, 2006
Posts: 9521
    
    2

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

Joined: Jun 25, 2001
Posts: 16250
    
  21

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.
 
Don't get me started about those stupid light bulbs.
 
subject: Is the faces-config modularized