[ 
https://issues.apache.org/jira/browse/MYFACES-3356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133438#comment-13133438
 ] 

Raul Kripalani commented on MYFACES-3356:
-----------------------------------------

Hi Leonardo,

Thanks for the quick fix.

Did this issue only impact the validation of navigation rules? Or did it also 
prevent the rules from actually being parsed, loaded and applied to requests?

Thanks,
Raúl.
                
> 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


Reply via email to