svn merge -r 1583140:1583206 ^/tiles/request/branches/TREQ_1_0_X .

git-svn-id: https://svn.apache.org/repos/asf/tiles/request/trunk@1587704 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/assembly/src/site/site.xml b/assembly/src/site/site.xml
index 565a866..b7672f4 100644
--- a/assembly/src/site/site.xml
+++ b/assembly/src/site/site.xml
@@ -21,20 +21,53 @@
  * under the License.
  */
 -->
-<project name="Apache Tiles - Assembly">
+<project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
+    <bannerLeft>
+        <name>Apache Tiles&#8482;</name>
+        <src>http://tiles.apache.org/images/logo.png</src>
+        <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
+    </bannerRight>
     <body>
 
         <menu name="Apache Tiles&#8482;">
             <item
-                   name="Home"
+                   name="Tiles Home"
                    href="../../index.html"/>
             <item
-                   name="Parent module"
+                   name="Request Microframework"
                    href="../index.html"/>
         </menu>
 
-        ${modules}
-        ${reports}
+        <menu ref="modules" />
+        <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/pom.xml b/pom.xml
index 0536a19..2479eb6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -169,7 +169,7 @@
             </dependency>
             <dependency>
                 <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-jdk14</artifactId>
+                <artifactId>slf4j-api</artifactId>
                 <version>1.5.8</version>
             </dependency>
             <dependency>
@@ -211,7 +211,7 @@
             <dependency>
                 <groupId>org.slf4j</groupId>
                 <artifactId>jcl-over-slf4j</artifactId>
-                <version>1.5.8</version>
+                <version>1.7.6</version>
             </dependency>
 
             <dependency>
@@ -290,6 +290,14 @@
             </dependency>
         </dependencies>
     </dependencyManagement>
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <version>1.7.6</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
     <profiles>
         <profile>
             <id>apache-release</id>
diff --git a/src/site/site.xml b/src/site/site.xml
index 15e8926..0bb06fc 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -22,31 +22,51 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
 
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
-                   name="Tiles Home"
-                   href="../index.html"/>
+                   name="Welcome"
+                   href="/index.html"/>
             <item
-                   name="Tiles Request Microframework"
-                   href="./index.html"/>
+                    name="Tiles 3.0.x"
+                    href="/framework/index.html"/>
+            <item
+                    name="Autotag 1.0.x"
+                    href="/tiles-autotag/index.html"/>
+            <item
+                    name="Request 1.0.x"
+                    href="/tiles-request/index.html"/>
+            <item
+                   name="Download"
+                   href="http://tiles.apache.org/download.html"/>
         </menu>
         <menu name="Reference">
             <item
@@ -57,17 +77,23 @@
         <menu name="Developers">
             <item
                     name="Building"
-                    href="/dev/building.html"/>
+                    href="dev/building.html"/>
             <item
                     name="Snapshots"
-                    href="/dev/snapshots.html"/>
+                    href="dev/snapshots.html"/>
             <item
                     name="Release Process"
-                    href="/dev/release.html"/>
+                    href="dev/release.html"/>
         </menu>
 
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/tiles-request-api/pom.xml b/tiles-request-api/pom.xml
index 651623e..2a32ef0 100644
--- a/tiles-request-api/pom.xml
+++ b/tiles-request-api/pom.xml
@@ -34,8 +34,7 @@
     <dependencies>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-jdk14</artifactId>
-            <optional>true</optional>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
diff --git a/tiles-request-api/src/main/java/org/apache/tiles/request/locale/PostfixedApplicationResource.java b/tiles-request-api/src/main/java/org/apache/tiles/request/locale/PostfixedApplicationResource.java
index 9864239..e612fde 100644
--- a/tiles-request-api/src/main/java/org/apache/tiles/request/locale/PostfixedApplicationResource.java
+++ b/tiles-request-api/src/main/java/org/apache/tiles/request/locale/PostfixedApplicationResource.java
@@ -21,14 +21,18 @@
 
 package org.apache.tiles.request.locale;
 
+import java.util.Arrays;
+import java.util.IllformedLocaleException;
+import java.util.List;
 import java.util.Locale;
-
 import org.apache.tiles.request.ApplicationResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * An ApplicationResource whose localization is managed by postfixing the file name.
  * The various localizations are file sitting next to each other, with the locale identified in the postfix.
- * 
+ *
  * For instance:
  * <pre>
  * /WEB-INF/tiles.xml
@@ -36,13 +40,15 @@
  * /WEB-INF/tiles_it.xml
  * /WEB-INF/tiles_it_IT.xml
  * </pre>
- * 
+ *
  * Two PostfixedApplicationResources are equals if they share the same localized path and the same class.
- * 
+ *
  * @version $Rev$ $Date$
  */
 public abstract class PostfixedApplicationResource implements ApplicationResource {
 
+    private static final Logger LOG = LoggerFactory.getLogger(PostfixedApplicationResource.class);
+
     /** The path without its suffix and its locale postfix. */
     private String pathPrefix;
     /** The suffix. */
@@ -69,18 +75,18 @@
         } else {
             pathPrefix = localePath.substring(0, prefixIndex);
             String localeString = localePath.substring(prefixIndex + 1, suffixIndex);
-            int countryIndex = localeString.indexOf('_');
-            if (countryIndex < 0) {
-                locale = new Locale(localeString);
-            } else {
-                int variantIndex = localeString.indexOf('_', countryIndex + 1);
-                if (variantIndex < 0) {
-                    locale = new Locale(localeString.substring(0, countryIndex),
-                            localeString.substring(countryIndex + 1));
-                } else {
-                    locale = new Locale(localeString.substring(0, countryIndex), localeString.substring(
-                            countryIndex + 1, variantIndex), localeString.substring(variantIndex + 1));
-                }
+            Locale found = localeFrom(localeString);
+            locale = validateLocale(found);
+            if (Locale.ROOT.equals(locale)) {
+                pathPrefix = suffixIndex < 0 ? localePath : localePath.substring(0, suffixIndex);
+
+                LOG.warn("No supported matching language for locale \"" + localeString + "\". Using "
+                        + getPath() + " as a non-localized resource path. see TILES-571");
+
+            } else if (!localeString.equalsIgnoreCase(getPostfix(locale).substring(1))) {
+                LOG.warn("For resource " + localePath
+                        + " the closest supported matching locale to \"" + localeString + "\" is \"" + locale
+                        + "\". Using " + getPath() + " as resource path. see TILES-571");
             }
         }
     }
@@ -193,4 +199,45 @@
             return false;
         return true;
     }
+
+    private static Locale localeFrom(String localeString) {
+        Locale.Builder builder = new Locale.Builder();
+        try {
+            int countryIndex = localeString.indexOf('_');
+            if (countryIndex < 0) {
+                builder.setLanguage(localeString);
+            } else {
+                int variantIndex = localeString.indexOf('_', countryIndex + 1);
+                builder.setLanguage(localeString.substring(0, countryIndex));
+                if (variantIndex < 0) {
+                    builder.setRegion(localeString.substring(countryIndex + 1));
+                } else {
+                    builder.setRegion(localeString.substring(countryIndex + 1, variantIndex));
+                    builder.setVariant(localeString.substring(variantIndex + 1));
+                }
+            }
+        } catch (IllformedLocaleException ex) {
+            LOG.debug(localeString + " is an ill-formed locale", ex);
+        }
+        return builder.build();
+    }
+
+    private static Locale validateLocale(Locale locale) {
+        List<Locale> availableLocales = Arrays.asList(Locale.getAvailableLocales());
+
+        Locale withoutVariant = locale.getVariant().isEmpty()
+                ? locale
+                : new Locale(locale.getLanguage(), locale.getCountry());
+
+        Locale result = locale;
+        if (!availableLocales.contains(withoutVariant)) {
+            if (!result.getCountry().isEmpty()) {
+                result = new Locale(result.getLanguage());
+            }
+            if (!availableLocales.contains(result)) {
+                result = Locale.ROOT;
+            }
+        }
+        return result;
+    }
 }
diff --git a/tiles-request-api/src/site/site.xml b/tiles-request-api/src/site/site.xml
index 8e92dd7..fce88a1 100644
--- a/tiles-request-api/src/site/site.xml
+++ b/tiles-request-api/src/site/site.xml
@@ -22,24 +22,34 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
-
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
                    name="Tiles Home"
@@ -52,5 +62,11 @@
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/tiles-request-api/src/test/java/org/apache/tiles/request/locale/PostfixedApplicationResourceTest.java b/tiles-request-api/src/test/java/org/apache/tiles/request/locale/PostfixedApplicationResourceTest.java
index 02c13e4..bca48ce 100644
--- a/tiles-request-api/src/test/java/org/apache/tiles/request/locale/PostfixedApplicationResourceTest.java
+++ b/tiles-request-api/src/test/java/org/apache/tiles/request/locale/PostfixedApplicationResourceTest.java
@@ -53,9 +53,9 @@
         public long getLastModified() throws IOException {
             return 0;
         }
-        
+
     };
-    
+
     /**
      * Test getLocalePath(String path, Locale locale).
      */
@@ -68,7 +68,7 @@
         assertEquals("/my/path_it_IT.html", resource.getLocalePath(Locale.ITALY));
         assertEquals("/my/path_en_GB_scotland.html", resource.getLocalePath(new Locale("en", "GB", "scotland")));
     }
-    
+
     @Test
     public void testBuildFromString() {
         TestApplicationResource resource = new TestApplicationResource("/my/path_en_GB_scotland.html");
@@ -87,8 +87,32 @@
         assertEquals("/my/path.html", resource.getLocalePath());
         assertEquals("/my/path.html", resource.getPath());
         assertEquals(Locale.ROOT, resource.getLocale());
+        resource = new TestApplicationResource("/my/path_zz.html");
+        assertEquals("/my/path_zz.html", resource.getLocalePath());
+        assertEquals("/my/path_zz.html", resource.getPath());
+        assertEquals(Locale.ROOT, resource.getLocale());
+        resource = new TestApplicationResource("/my/path_en_ZZ.html");
+        assertEquals("/my/path_en.html", resource.getLocalePath());
+        assertEquals("/my/path.html", resource.getPath());
+        assertEquals(new Locale("en"), resource.getLocale());
+        resource = new TestApplicationResource("/my/path_tiles.html");
+        assertEquals("/my/path_tiles.html", resource.getLocalePath());
+        assertEquals("/my/path_tiles.html", resource.getPath());
+        assertEquals(Locale.ROOT, resource.getLocale());
+        resource = new TestApplicationResource("/my/path_longwordthatbreaksISO639.html");
+        assertEquals("/my/path_longwordthatbreaksISO639.html", resource.getLocalePath());
+        assertEquals("/my/path_longwordthatbreaksISO639.html", resource.getPath());
+        assertEquals(Locale.ROOT, resource.getLocale());
+        resource = new TestApplicationResource("/my/path_en_tiles.html");
+        assertEquals("/my/path_en.html", resource.getLocalePath());
+        assertEquals("/my/path.html", resource.getPath());
+        assertEquals(new Locale("en"), resource.getLocale());
+        resource = new TestApplicationResource("/my/path_en_longwordthatbreaksISO3166.html");
+        assertEquals("/my/path_en.html", resource.getLocalePath());
+        assertEquals("/my/path.html", resource.getPath());
+        assertEquals(new Locale("en"), resource.getLocale());
     }
-    
+
     @Test
     public void testBuildFromStringAndLocale() {
         TestApplicationResource resource = new TestApplicationResource("/my/path.html", new Locale("en", "GB", "scotland"));
diff --git a/tiles-request-api/src/test/java/org/apache/tiles/request/locale/URLApplicationResourceTest.java b/tiles-request-api/src/test/java/org/apache/tiles/request/locale/URLApplicationResourceTest.java
index e982e09..3311787 100644
--- a/tiles-request-api/src/test/java/org/apache/tiles/request/locale/URLApplicationResourceTest.java
+++ b/tiles-request-api/src/test/java/org/apache/tiles/request/locale/URLApplicationResourceTest.java
@@ -97,6 +97,42 @@
         assertEquals("file:/", resource.getURL().toString());
         assertEquals("/", resource.getFile().toString());
         assertEquals(Locale.ROOT, resource.getLocale());
+        resource = new TestApplicationResource("/my/path_zz.html", new URL("file:///"));
+        assertEquals("/my/path_zz.html", resource.getLocalePath());
+        assertEquals("/my/path_zz.html", resource.getPath());
+        assertEquals("file:/", resource.getURL().toString());
+        assertEquals("/", resource.getFile().toString());
+        assertEquals(Locale.ROOT, resource.getLocale());
+        resource = new TestApplicationResource("/my/path_en_ZZ.html", new URL("file:///"));
+        assertEquals("/my/path_en.html", resource.getLocalePath());
+        assertEquals("/my/path.html", resource.getPath());
+        assertEquals("file:/", resource.getURL().toString());
+        assertEquals("/", resource.getFile().toString());
+        assertEquals(new Locale("en"), resource.getLocale());
+        resource = new TestApplicationResource("/my/path_tiles.html", new URL("file:///"));
+        assertEquals("/my/path_tiles.html", resource.getLocalePath());
+        assertEquals("/my/path_tiles.html", resource.getPath());
+        assertEquals("file:/", resource.getURL().toString());
+        assertEquals("/", resource.getFile().toString());
+        assertEquals(Locale.ROOT, resource.getLocale());
+        resource = new TestApplicationResource("/my/path_longwordthatbreaksISO639.html", new URL("file:///"));
+        assertEquals("/my/path_longwordthatbreaksISO639.html", resource.getLocalePath());
+        assertEquals("/my/path_longwordthatbreaksISO639.html", resource.getPath());
+        assertEquals("file:/", resource.getURL().toString());
+        assertEquals("/", resource.getFile().toString());
+        assertEquals(Locale.ROOT, resource.getLocale());
+        resource = new TestApplicationResource("/my/path_en_tiles.html", new URL("file:///"));
+        assertEquals("/my/path_en.html", resource.getLocalePath());
+        assertEquals("/my/path.html", resource.getPath());
+        assertEquals("file:/", resource.getURL().toString());
+        assertEquals("/", resource.getFile().toString());
+        assertEquals(new Locale("en"), resource.getLocale());
+        resource = new TestApplicationResource("/my/path_en_longwordthatbreaksISO3166.html", new URL("file:///"));
+        assertEquals("/my/path_en.html", resource.getLocalePath());
+        assertEquals("/my/path.html", resource.getPath());
+        assertEquals("file:/", resource.getURL().toString());
+        assertEquals("/", resource.getFile().toString());
+        assertEquals(new Locale("en"), resource.getLocale());
     }
 
     @Test
diff --git a/tiles-request-freemarker/pom.xml b/tiles-request-freemarker/pom.xml
index cd3a54f..c47295a 100644
--- a/tiles-request-freemarker/pom.xml
+++ b/tiles-request-freemarker/pom.xml
@@ -49,11 +49,10 @@
   		<artifactId>servlet-api</artifactId>
   		<scope>provided</scope>
   	</dependency>
-  	<dependency>
-  		<groupId>org.slf4j</groupId>
-  		<artifactId>slf4j-jdk14</artifactId>
-  		<optional>true</optional>
-  	</dependency>
+    <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
+    </dependency>
   	<dependency>
   		<groupId>junit</groupId>
   		<artifactId>junit</artifactId>
diff --git a/tiles-request-freemarker/src/site/site.xml b/tiles-request-freemarker/src/site/site.xml
index 8e92dd7..fce88a1 100644
--- a/tiles-request-freemarker/src/site/site.xml
+++ b/tiles-request-freemarker/src/site/site.xml
@@ -22,24 +22,34 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
-
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
                    name="Tiles Home"
@@ -52,5 +62,11 @@
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/tiles-request-jsp/pom.xml b/tiles-request-jsp/pom.xml
index e3dfccf..8630348 100644
--- a/tiles-request-jsp/pom.xml
+++ b/tiles-request-jsp/pom.xml
@@ -40,11 +40,10 @@
 			<groupId>org.apache.tiles</groupId>
 			<artifactId>tiles-request-servlet</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-jdk14</artifactId>
-			<optional>true</optional>
-		</dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
 		<dependency>
 			<groupId>javax.servlet</groupId>
 			<artifactId>servlet-api</artifactId>
diff --git a/tiles-request-jsp/src/site/site.xml b/tiles-request-jsp/src/site/site.xml
index 8e92dd7..fce88a1 100644
--- a/tiles-request-jsp/src/site/site.xml
+++ b/tiles-request-jsp/src/site/site.xml
@@ -22,24 +22,34 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
-
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
                    name="Tiles Home"
@@ -52,5 +62,11 @@
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/tiles-request-mustache/src/site/site.xml b/tiles-request-mustache/src/site/site.xml
index 8e92dd7..fce88a1 100644
--- a/tiles-request-mustache/src/site/site.xml
+++ b/tiles-request-mustache/src/site/site.xml
@@ -22,24 +22,34 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
-
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
                    name="Tiles Home"
@@ -52,5 +62,11 @@
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/tiles-request-portlet-wildcard/pom.xml b/tiles-request-portlet-wildcard/pom.xml
index d75a205..7a8eeef 100644
--- a/tiles-request-portlet-wildcard/pom.xml
+++ b/tiles-request-portlet-wildcard/pom.xml
@@ -83,11 +83,9 @@
       <artifactId>jcl-over-slf4j</artifactId>
       <optional>true</optional>
     </dependency>
-
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-jdk14</artifactId>
-      <optional>true</optional>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
     </dependency>
 
 
diff --git a/tiles-request-portlet-wildcard/src/site/site.xml b/tiles-request-portlet-wildcard/src/site/site.xml
index 8e92dd7..6aa8e5f 100644
--- a/tiles-request-portlet-wildcard/src/site/site.xml
+++ b/tiles-request-portlet-wildcard/src/site/site.xml
@@ -22,24 +22,35 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
 
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
                    name="Tiles Home"
@@ -52,5 +63,11 @@
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/tiles-request-portlet/pom.xml b/tiles-request-portlet/pom.xml
index bd6382b..e2c446b 100644
--- a/tiles-request-portlet/pom.xml
+++ b/tiles-request-portlet/pom.xml
@@ -73,9 +73,8 @@
     </dependency>
 
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-jdk14</artifactId>
-      <optional>true</optional>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
     </dependency>
 
     <dependency>
diff --git a/tiles-request-portlet/src/site/site.xml b/tiles-request-portlet/src/site/site.xml
index d52171a..3fa76e4 100644
--- a/tiles-request-portlet/src/site/site.xml
+++ b/tiles-request-portlet/src/site/site.xml
@@ -22,24 +22,35 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
 
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
                    name="Tiles Home"
@@ -52,5 +63,11 @@
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/tiles-request-servlet-wildcard/pom.xml b/tiles-request-servlet-wildcard/pom.xml
index fc2c831..b411098 100644
--- a/tiles-request-servlet-wildcard/pom.xml
+++ b/tiles-request-servlet-wildcard/pom.xml
@@ -67,9 +67,8 @@
     </dependency>
 
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-jdk14</artifactId>
-      <optional>true</optional>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
diff --git a/tiles-request-servlet-wildcard/src/site/site.xml b/tiles-request-servlet-wildcard/src/site/site.xml
index 8e92dd7..fce88a1 100644
--- a/tiles-request-servlet-wildcard/src/site/site.xml
+++ b/tiles-request-servlet-wildcard/src/site/site.xml
@@ -22,24 +22,34 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
-
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
                    name="Tiles Home"
@@ -52,5 +62,11 @@
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/tiles-request-servlet/src/site/site.xml b/tiles-request-servlet/src/site/site.xml
index 8e92dd7..fce88a1 100644
--- a/tiles-request-servlet/src/site/site.xml
+++ b/tiles-request-servlet/src/site/site.xml
@@ -22,24 +22,34 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
-
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
                    name="Tiles Home"
@@ -52,5 +62,11 @@
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>
diff --git a/tiles-request-velocity/src/site/site.xml b/tiles-request-velocity/src/site/site.xml
index 8e92dd7..fce88a1 100644
--- a/tiles-request-velocity/src/site/site.xml
+++ b/tiles-request-velocity/src/site/site.xml
@@ -22,24 +22,34 @@
  */
 -->
 <project name="Apache - Request Microframework">
+     <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.3.0</version>
+     </skin>
+     <custom>
+        <fluidoSkin>
+        <topBarEnabled>true</topBarEnabled>
+        <sideBarEnabled>false</sideBarEnabled>
+        <searchEnabled>true</searchEnabled>
+        <gitHub>
+            <projectId>apache/tiles-request</projectId>
+            <ribbonOrientation>right</ribbonOrientation>
+            <ribbonColor>darkblue</ribbonColor>
+        </gitHub>
+        </fluidoSkin>
+     </custom>
     <bannerLeft>
-        <name>Apache Software Foundation</name>
-        <src>http://www.apache.org/images/asf-logo.gif</src>
-        <href>http://www.apache.org</href>
-    </bannerLeft>
-    <bannerRight>
         <name>Apache Tiles&#8482;</name>
         <src>http://tiles.apache.org/images/logo.png</src>
         <href>http://tiles.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Software Foundation</name>
+        <src>http://struts.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
     </bannerRight>
     <body>
-
-        <links>
-            <item name="Apache" href="http://www.apache.org" />
-            <item name="Tiles" href="http://tiles.apache.org" />
-        </links>
-
-
         <menu name="Apache Tiles&#8482;">
             <item
                    name="Tiles Home"
@@ -52,5 +62,11 @@
         <menu ref="modules" />
         <menu ref="reports" />
 
+        <footer>
+            <div class="row span12">
+                Apache Tiles, Tiles, Apache, the Apache feather logo, and the Apache Tiles
+                project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </footer>
     </body>
 </project>