my dog learned polymorphism*
The moose likes JSF and the fly likes JSF faces-config.xml overwrite Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF faces-config.xml overwrite" Watch "JSF faces-config.xml overwrite" New topic

JSF faces-config.xml overwrite

urvish shah

Joined: Jan 06, 2005
Posts: 5

Can we overwrite faces-config.xml runtime? What I mean is I have specified navigation rule for success or failure in faces-config., But I want to use different rule now without changing the config file can I do it?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60822

Moving to the Web App Frameworks forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Probably you can't and you should'nt,
but you can achieve the similar functionality by using NavigationHandler class.
Use handleNavigation method to execute a navigation stated in faces-config.xml
Method's signature is:

handleNavigation(javax.faces.context.FacesContext context, java.lang.String fromAction, java.lang.String outcome)

- Varun
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299

Moving to our brand new JSF Forum...

GenRocket - Experts at Building Test Data
I agree. Here's the link:
subject: JSF faces-config.xml overwrite
Similar Threads
Text Box after pressing button
Getting Cannot find FacesContext and sometime showing html codes in the page
JSF with Weblogic 8.1 sp3
global exception handling
Is the faces-config modularized