You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2009/11/04 07:54:55 UTC

svn commit: r832666 - /myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java

Author: matzew
Date: Wed Nov  4 06:54:55 2009
New Revision: 832666

URL: http://svn.apache.org/viewvc?rev=832666&view=rev
Log:
TRINIDAD-1622 - JSF 2.0: Need to provide ExternalContext.getResource() override to call into the PageResolver when a JSP page is executed

Thanks to Max Starets for his patch

Modified:
    myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java?rev=832666&r1=832665&r2=832666&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java Wed Nov  4 06:54:55 2009
@@ -19,6 +19,10 @@
 package org.apache.myfaces.trinidadinternal.context;
 
 import java.io.IOException;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
 import java.util.Iterator;
 import java.util.Map;
 
@@ -266,6 +270,18 @@
 
       super.dispatch(path);
     }
+    
+    @Override
+    public URL getResource(String path)
+                             throws MalformedURLException
+    {
+      RequestContext afc = RequestContext.getCurrentInstance();
+      if (afc != null)
+      {
+        path = afc.getPageResolver().getPhysicalURI(path);
+      }
+      return super.getResource(path);
+    }
 
 
     @Override