You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (Resolved) (JIRA)" <de...@myfaces.apache.org> on 2011/10/22 18:51:32 UTC

[jira] [Resolved] (MYFACES-3356) MyFaces assumes that the WAR is exploded and XHTML pages are accessible in filesystem

     [ https://issues.apache.org/jira/browse/MYFACES-3356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-3356.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.4
                   2.0.10
         Assignee: Leonardo Uribe

Applied in 2.0.x and 2.1.x only. Thanks for the report.
                
> MyFaces assumes that the WAR is exploded and XHTML pages 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: 1.1.9, 1.2.10, 2.0.9, 2.1.3
>            Reporter: Raul Kripalani
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.10, 2.1.4
>
>
> 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