You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shale.apache.org by cr...@apache.org on 2007/04/14 06:18:28 UTC

svn commit: r528753 - in /shale/framework/trunk/shale-remoting/src/main: java/org/apache/shale/remoting/faces/MappingsHelper.java resources/org/apache/shale/remoting/Bundle.properties resources/org/apache/shale/remoting/Bundle_no.properties

Author: craigmcc
Date: Fri Apr 13 21:18:27 2007
New Revision: 528753

URL: http://svn.apache.org/viewvc?view=rev&rev=528753
Log:
[SHALE-434] Do not throw an NPE if no FacesServlet definition is found.  Thanks
to Ken Paulsen for the patch.

Modified:
    shale/framework/trunk/shale-remoting/src/main/java/org/apache/shale/remoting/faces/MappingsHelper.java
    shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle.properties
    shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle_no.properties

Modified: shale/framework/trunk/shale-remoting/src/main/java/org/apache/shale/remoting/faces/MappingsHelper.java
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-remoting/src/main/java/org/apache/shale/remoting/faces/MappingsHelper.java?view=diff&rev=528753&r1=528752&r2=528753
==============================================================================
--- shale/framework/trunk/shale-remoting/src/main/java/org/apache/shale/remoting/faces/MappingsHelper.java (original)
+++ shale/framework/trunk/shale-remoting/src/main/java/org/apache/shale/remoting/faces/MappingsHelper.java Fri Apr 13 21:18:27 2007
@@ -410,6 +410,14 @@
             }
         }
 
+        // If there is no such mapping, return a zero length array
+        if (null == name) {
+            if (log().isInfoEnabled()) {
+                log().info(bundle.getString("xhtml.noServletMapping"));
+            }
+            return new String[0];
+        }
+
         // Identify the URL patterns to which this servlet is mapped
         List list = new ArrayList();
         NodeList mappingNodes = document.getElementsByTagName("servlet-mapping");

Modified: shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle.properties
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle.properties?view=diff&rev=528753&r1=528752&r2=528753
==============================================================================
--- shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle.properties (original)
+++ shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle.properties Fri Apr 13 21:18:27 2007
@@ -25,4 +25,4 @@
 xhtml.noMappings=The "Mappings" instance for this application has not yet been configured -- check your server logs to ensure there were no startup exceptions
 xhtml.noMechanism=The resource mechanism you have specified is null
 xhtml.noResourceId=The resource identifier you have specified is null
-xhtml.noServletMapping=The "Mappings" instance is not configured with the servlet mapping(s) for javax.facesl.webapp.FacesServlet -- check your web.xml file to make sure this servlet is declared and mapped
+xhtml.noServletMapping=The "Mappings" instance is not configured with the servlet mapping(s) for javax.faces.webapp.FacesServlet -- check your web.xml file to make sure this servlet is declared and mapped, or that you have defined it with the "org.apache.shale.remoting.FACES_SERVLET_NAME" context initialization parameter

Modified: shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle_no.properties
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle_no.properties?view=diff&rev=528753&r1=528752&r2=528753
==============================================================================
--- shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle_no.properties (original)
+++ shale/framework/trunk/shale-remoting/src/main/resources/org/apache/shale/remoting/Bundle_no.properties Fri Apr 13 21:18:27 2007
@@ -31,4 +31,4 @@
 xhtml.noMappings       = "Mappings" instansen for denne applikasjonen er ikke konfigurert enn\u00E5 - sjekk tjener loggene for \u00E5 forsikre deg om at det ikke var oppstarts unntak.
 xhtml.noMechanism      = Ressurs mekanismen du har spesifisert er tom
 xhtml.noResourceId     = Ressurs identifikatoren du spesifiserte er tom
-xhtml.noServletMapping = "Mappings" instansen er ikke konfigurert for servlet tilknyttning(er) for javax.facesl.webapp.FacesServlet -- sjekk web.xml filen for \u00E5 forsikre deg om at denne servlet er deklarert og tilknyttet.
+xhtml.noServletMapping = "Mappings" instansen er ikke konfigurert for servlet tilknyttning(er) for javax.faces.webapp.FacesServlet -- sjekk web.xml filen for \u00E5 forsikre deg om at denne servlet er deklarert og tilknyttet.