MyFaces assumes that the WAR is exploded and XHTML files are accessible in filesystem -------------------------------------------------------------------------------------
Key: MYFACES-3356 URL: https://issues.apache.org/jira/browse/MYFACES-3356 Project: MyFaces Core Issue Type: Bug Components: General Affects Versions: 2.1.3 Reporter: Raul K. During initialization, MyFaces assumes that the Web Application has been exploded in some location in the filesystem. This assumption is caused by heavily using [ServletContext.getRealPath|http://download.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)] during initialization, as well as File objects to access xhtml pages. This makes MyFaces behave badly in containers which do not need to explode WARs, e.g. Apache Karaf with PAX Web. It also hinders OSGi-friendliness. I have pinpointed the following locations, at least: * org.apache.myfaces.config.FacesConfigValidator (line 102 in v2.1.3): when validating the from-id and to-id in the navigation rules. * org.apache.myfaces.webapp.AbstractFacesInitializer (line 320 in v2.1.3): when setting the context path for validations * org.apache.myfaces.webapp.AbstractFacesInitializer (line 133 in v2.1.3): logging It would be a good idea to refactor this code to use ServletContext.getResource, as naturally XHTML files are bound to be WAR resources anyway. This will also make MyFaces more implementation-agnostic. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira