[
http://issues.apache.org/jira/browse/MYFACES-208?page=comments#action_12319349
]
Martin Marinschek commented on MYFACES-208:
-------------------------------------------
P.S.:
this is what the RI does. I put the license header up on top so that it is
clear that this code snippet is under suns license.
/*
* $Id: ConfigureListener.java,v 1.47 2005/08/11 18:19:57 edburns Exp $
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
// Step 3, parse any "/META-INF/faces-config.xml" resources
Iterator resources;
try {
List list = new LinkedList();
Enumeration items = Util.getCurrentLoader(this).
getResources(META_INF_RESOURCES);
while (items.hasMoreElements()) {
list.add(0, items.nextElement());
}
resources = list.iterator();
} catch (IOException e) {
String message = null;
try {
message = Util.getExceptionMessageString
(Util.CANT_PARSE_FILE_ERROR_MESSAGE_ID,
new Object[]{ META_INF_RESOURCES });
} catch (Exception ee) {
message = "Can't parse configuration file:" +
META_INF_RESOURCES;
}
if ( logger.isLoggable(Level.WARNING)) {
logger.log(Level.WARNING, message, e);
}
throw new FacesException(message, e);
}
while (resources.hasNext()) {
url = (URL) resources.next();
parse(digester, url, fcb);
}
> faces-config.xml is only found in jar files located in WEB-INF/lib
> ------------------------------------------------------------------
>
> Key: MYFACES-208
> URL: http://issues.apache.org/jira/browse/MYFACES-208
> Project: MyFaces
> Type: Bug
> Components: General
> Environment: Fedora Core 3
> JBoss/Jetty 3.2.1
> Reporter: Chris Rudd
> Assignee: Manfred Geiler
> Priority: Blocker
>
> When scaning for faces-config.xml files it currently only looks for them
> inside the jars of WEB-INF/lib.
> The RI scans the classpath via a getResources("META-INF/faces-config.xml").
> Im not sure which is correct, but it seems the RI's method is better as it
> allows the config files to exist in the WEB-INF/classes dir as well as allow
> JSF components and such to be installed into the container (thus shared will
> all apps).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira