You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2008/06/07 00:43:53 UTC

svn commit: r664175 [12/13] - in /geronimo/samples/branches/2.1/samples: ./ app-per-port/ app-per-port/app-per-port-connector-war/ app-per-port/app-per-port-connector-war/src/main/webapp/WEB-INF/ app-per-port/app-per-port-ear/ app-per-port/app-per-port...

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-jetty/pom.xml?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-jetty/pom.xml (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-jetty/pom.xml Fri Jun  6 15:43:44 2008
@@ -33,8 +33,8 @@
     <name>Geronimo Samples :: Servlet Examples for Jetty</name>
     <packaging>car</packaging>
 
-    <description>The Servlet examples originally developed for Tomcat. Can be found via HTTP at /servlets-examples/ after installation. These examples give a basic introduction to Servlet development along with sample code.</description> 
-    
+    <description>The Servlet examples originally developed for Tomcat. Can be found via HTTP at /servlets-examples/ after installation. These examples give a basic introduction to Servlet development along with sample code.</description>
+
     <dependencies>
 
         <dependency>
@@ -54,11 +54,11 @@
         </dependency>
 
         <!--<dependency>-->
-            <!--<groupId>org.apache.geronimo.configs</groupId>-->
-            <!--<artifactId>jasper-deployer</artifactId>-->
-            <!--<version>${geronimoVersion}</version>-->
-            <!--<type>car</type>-->
-            <!--<scope>provided</scope>-->
+        <!--<groupId>org.apache.geronimo.configs</groupId>-->
+        <!--<artifactId>jasper-deployer</artifactId>-->
+        <!--<version>${geronimoVersion}</version>-->
+        <!--<type>car</type>-->
+        <!--<scope>provided</scope>-->
         <!--</dependency>-->
 
         <dependency>
@@ -82,7 +82,7 @@
                 <filtering>true</filtering>
             </resource>
         </resources>
-        
+
         <plugins>
             <plugin>
                 <groupId>org.apache.geronimo.buildsupport</groupId>
@@ -105,21 +105,21 @@
                     </useMavenDependencies>
                     <category>Sample</category>
                     <!--<instance>-->
-                        <!--<plugin-artifact>-->
-                            <!--<prerequisite>-->
-                                <!--<id>-->
-                                    <!--<groupId>org.apache.geronimo.configs</groupId>-->
-                                    <!--<artifactId>jetty6</artifactId>-->
-                                <!--</id>-->
-                                <!--<resource-type>Web Container</resource-type>-->
-                                <!--<description>-->
-                                    <!--This version of the application works with the Geronimo/Jetty distribution. -->
-                                    <!--It is not intended to run in the Geronimo/Tomcat distribution. -->
-                                    <!--There is a separate version of the application that works with Tomcat. -->
-                                    <!--Please install the version appropriate to your Geronimo distribution.-->
-                                <!--</description> -->
-                            <!--</prerequisite>-->
-                        <!--</plugin-artifact>-->
+                    <!--<plugin-artifact>-->
+                    <!--<prerequisite>-->
+                    <!--<id>-->
+                    <!--<groupId>org.apache.geronimo.configs</groupId>-->
+                    <!--<artifactId>jetty6</artifactId>-->
+                    <!--</id>-->
+                    <!--<resource-type>Web Container</resource-type>-->
+                    <!--<description>-->
+                    <!--This version of the application works with the Geronimo/Jetty distribution. -->
+                    <!--It is not intended to run in the Geronimo/Tomcat distribution. -->
+                    <!--There is a separate version of the application that works with Tomcat. -->
+                    <!--Please install the version appropriate to your Geronimo distribution.-->
+                    <!--</description> -->
+                    <!--</prerequisite>-->
+                    <!--</plugin-artifact>-->
                     <!--</instance>-->
                 </configuration>
             </plugin>

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-jetty/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-jetty/src/main/plan/plan.xml?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-jetty/src/main/plan/plan.xml (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-jetty/src/main/plan/plan.xml Fri Jun  6 15:43:44 2008
@@ -15,13 +15,13 @@
     limitations under the License.-->
 <!--$Rev$ $Date$-->
 <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.2">
-  <context-root>/servlets-examples</context-root>
-  <security-realm-name>geronimo-admin</security-realm-name>
-  <security>
-    <role-mappings>
-      <role role-name="tomcat">
-        <principal name="admin" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
-      </role>
-    </role-mappings>
-  </security>
+    <context-root>/servlets-examples</context-root>
+    <security-realm-name>geronimo-admin</security-realm-name>
+    <security>
+        <role-mappings>
+            <role role-name="tomcat">
+                <principal name="admin" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+            </role>
+        </role-mappings>
+    </security>
 </web-app>
\ No newline at end of file

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-tomcat/pom.xml?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-tomcat/pom.xml (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-tomcat/pom.xml Fri Jun  6 15:43:44 2008
@@ -33,8 +33,8 @@
     <name>Geronimo Samples :: Servlet Examples for Tomcat</name>
     <packaging>car</packaging>
 
-    <description>The Servlet examples originally developed for Tomcat. Can be found via HTTP at /servlets-examples/ after installation. These examples give a basic introduction to Servlet development along with sample code.</description> 
-    
+    <description>The Servlet examples originally developed for Tomcat. Can be found via HTTP at /servlets-examples/ after installation. These examples give a basic introduction to Servlet development along with sample code.</description>
+
     <dependencies>
 
         <dependency>
@@ -44,7 +44,7 @@
             <type>war</type>
             <scope>provided</scope>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>tomcat6-deployer</artifactId>
@@ -54,18 +54,18 @@
         </dependency>
 
         <!--<dependency>-->
-            <!--<groupId>org.apache.geronimo.configs</groupId>-->
-            <!--<artifactId>jasper-deployer</artifactId>-->
-            <!--<version>${geronimoVersion}</version>-->
-            <!--<type>car</type>-->
-            <!--<scope>provided</scope>-->
+        <!--<groupId>org.apache.geronimo.configs</groupId>-->
+        <!--<artifactId>jasper-deployer</artifactId>-->
+        <!--<version>${geronimoVersion}</version>-->
+        <!--<type>car</type>-->
+        <!--<scope>provided</scope>-->
         <!--</dependency>-->
 
         <!--<dependency>-->
-            <!--<groupId>org.apache.geronimo.configs</groupId>-->
-            <!--<artifactId>jasper</artifactId>-->
-            <!--<version>${geronimoVersion}</version>-->
-            <!--<type>car</type>-->
+        <!--<groupId>org.apache.geronimo.configs</groupId>-->
+        <!--<artifactId>jasper</artifactId>-->
+        <!--<version>${geronimoVersion}</version>-->
+        <!--<type>car</type>-->
         <!--</dependency>-->
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
@@ -75,7 +75,7 @@
         </dependency>
 
     </dependencies>
-    
+
     <build>
         <resources>
             <resource>
@@ -83,7 +83,7 @@
                 <filtering>true</filtering>
             </resource>
         </resources>
-        
+
         <plugins>
             <plugin>
                 <groupId>org.apache.geronimo.buildsupport</groupId>
@@ -106,21 +106,21 @@
                     </useMavenDependencies>
                     <category>Sample</category>
                     <!--<instance>-->
-                        <!--<plugin-artifact>-->
-                            <!--<prerequisite>-->
-                                <!--<id>-->
-                                    <!--<groupId>org.apache.geronimo.configs</groupId>-->
-                                    <!--<artifactId>tomcat6</artifactId>-->
-                                <!--</id>-->
-                                <!--<resource-type>Web Container</resource-type>-->
-                                <!--<description>-->
-                                    <!--This version of the application works with the Geronimo/Tomcat distribution. -->
-                                    <!--It is not intended to run in the Geronimo/Jetty distribution. -->
-                                    <!--There is a separate version of the application that works with Jetty. -->
-                                    <!--Please install the version appropriate to your Geronimo distribution.-->
-                                <!--</description> -->
-                            <!--</prerequisite>-->
-                        <!--</plugin-artifact>-->
+                    <!--<plugin-artifact>-->
+                    <!--<prerequisite>-->
+                    <!--<id>-->
+                    <!--<groupId>org.apache.geronimo.configs</groupId>-->
+                    <!--<artifactId>tomcat6</artifactId>-->
+                    <!--</id>-->
+                    <!--<resource-type>Web Container</resource-type>-->
+                    <!--<description>-->
+                    <!--This version of the application works with the Geronimo/Tomcat distribution. -->
+                    <!--It is not intended to run in the Geronimo/Jetty distribution. -->
+                    <!--There is a separate version of the application that works with Jetty. -->
+                    <!--Please install the version appropriate to your Geronimo distribution.-->
+                    <!--</description> -->
+                    <!--</prerequisite>-->
+                    <!--</plugin-artifact>-->
                     <!--</instance>-->
                 </configuration>
             </plugin>

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-tomcat/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-tomcat/src/main/plan/plan.xml?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-tomcat/src/main/plan/plan.xml (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-tomcat/src/main/plan/plan.xml Fri Jun  6 15:43:44 2008
@@ -15,13 +15,13 @@
     limitations under the License.-->
 <!--$Rev$ $Date$-->
 <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.2">
-  <context-root>/servlets-examples</context-root>
-  <security-realm-name>geronimo-admin</security-realm-name>
-  <security>
-    <role-mappings>
-      <role role-name="tomcat">
-        <principal name="admin" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
-      </role>
-    </role-mappings>
-  </security>
+    <context-root>/servlets-examples</context-root>
+    <security-realm-name>geronimo-admin</security-realm-name>
+    <security>
+        <role-mappings>
+            <role role-name="tomcat">
+                <principal name="admin" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+            </role>
+        </role-mappings>
+    </security>
 </web-app>
\ No newline at end of file

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/pom.xml?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/pom.xml (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/pom.xml Fri Jun  6 15:43:44 2008
@@ -19,9 +19,9 @@
 <!-- $Rev$ $Date$ -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    
+
     <modelVersion>4.0.0</modelVersion>
-    
+
     <parent>
         <groupId>org.apache.geronimo.samples</groupId>
         <artifactId>servlet-examples</artifactId>
@@ -31,5 +31,5 @@
     <artifactId>servlet-examples-war</artifactId>
     <name>Geronimo Samples :: Servlet Examples WAR</name>
     <packaging>war</packaging>
-    
+
 </project>

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/CookieExample.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/CookieExample.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/CookieExample.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/CookieExample.java Fri Jun  6 15:43:44 2008
@@ -18,10 +18,15 @@
  *
  */
 
-import java.io.*;
-import java.util.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ResourceBundle;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import util.HTMLFilter;
 
@@ -34,11 +39,10 @@
 public class CookieExample extends HttpServlet {
 
     ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
-    
+
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
-        throws IOException, ServletException
-    {
+            throws IOException, ServletException {
         response.setContentType("text/html");
 
         PrintWriter out = response.getWriter();
@@ -51,18 +55,18 @@
         out.println("</head>");
         out.println("<body>");
 
-	// relative links
+        // relative links
 
         // XXX
         // making these absolute till we work out the
         // addition of a PathInfo issue 
-	
+
         out.println("<a href=\"../cookies.html\">");
         out.println("<img src=\"../images/code.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"view code\"></a>");
+                "width=24 align=right border=0 alt=\"view code\"></a>");
         out.println("<a href=\"../index.html\">");
         out.println("<img src=\"../images/return.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"return\"></a>");
+                "width=24 align=right border=0 alt=\"return\"></a>");
 
         out.println("<h3>" + title + "</h3>");
 
@@ -72,10 +76,10 @@
             for (int i = 0; i < cookies.length; i++) {
                 Cookie cookie = cookies[i];
                 out.print("Cookie Name: " + HTMLFilter.filter(cookie.getName())
-                          + "<br>");
-                out.println("  Cookie Value: " 
-                            + HTMLFilter.filter(cookie.getValue())
-                            + "<br><br>");
+                        + "<br>");
+                out.println("  Cookie Value: "
+                        + HTMLFilter.filter(cookie.getValue())
+                        + "<br><br>");
             }
         } else {
             out.println(rb.getString("cookies.no-cookies"));
@@ -88,12 +92,12 @@
             response.addCookie(cookie);
             out.println("<P>");
             out.println(rb.getString("cookies.set") + "<br>");
-            out.print(rb.getString("cookies.name") + "  " 
-                      + HTMLFilter.filter(cookieName) + "<br>");
-            out.print(rb.getString("cookies.value") + "  " 
-                      + HTMLFilter.filter(cookieValue));
+            out.print(rb.getString("cookies.name") + "  "
+                    + HTMLFilter.filter(cookieName) + "<br>");
+            out.print(rb.getString("cookies.value") + "  "
+                    + HTMLFilter.filter(cookieValue));
         }
-        
+
         out.println("<P>");
         out.println(rb.getString("cookies.make-cookie") + "<br>");
         out.print("<form action=\"");
@@ -103,16 +107,15 @@
         out.print(rb.getString("cookies.value") + "  ");
         out.println("<input type=text length=20 name=cookievalue><br>");
         out.println("<input type=submit></form>");
-            
-            
+
+
         out.println("</body>");
         out.println("</html>");
     }
 
     public void doPost(HttpServletRequest request,
-                      HttpServletResponse response)
-        throws IOException, ServletException
-    {
+                       HttpServletResponse response)
+            throws IOException, ServletException {
         doGet(request, response);
     }
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/HelloWorldExample.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/HelloWorldExample.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/HelloWorldExample.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/HelloWorldExample.java Fri Jun  6 15:43:44 2008
@@ -18,10 +18,14 @@
  *
  */
 
-import java.io.*;
-import java.util.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ResourceBundle;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * The simplest possible servlet.
@@ -34,37 +38,36 @@
 
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
-        throws IOException, ServletException
-    {
+            throws IOException, ServletException {
         ResourceBundle rb =
-            ResourceBundle.getBundle("LocalStrings",request.getLocale());
+                ResourceBundle.getBundle("LocalStrings", request.getLocale());
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
 
         out.println("<html>");
         out.println("<head>");
 
-	    String title = rb.getString("helloworld.title");
+        String title = rb.getString("helloworld.title");
 
-	    out.println("<title>" + title + "</title>");
+        out.println("<title>" + title + "</title>");
         out.println("</head>");
         out.println("<body bgcolor=\"white\">");
 
-	// note that all links are created to be relative. this
-	// ensures that we can move the web application that this
-	// servlet belongs to to a different place in the url
-	// tree and not have any harmful side effects.
+        // note that all links are created to be relative. this
+        // ensures that we can move the web application that this
+        // servlet belongs to to a different place in the url
+        // tree and not have any harmful side effects.
 
         // XXX
         // making these absolute till we work out the
         // addition of a PathInfo issue
 
-	    out.println("<a href=\"../helloworld.html\">");
+        out.println("<a href=\"../helloworld.html\">");
         out.println("<img src=\"../images/code.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"view code\"></a>");
+                "width=24 align=right border=0 alt=\"view code\"></a>");
         out.println("<a href=\"../index.html\">");
         out.println("<img src=\"../images/return.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"return\"></a>");
+                "width=24 align=right border=0 alt=\"return\"></a>");
         out.println("<h1>" + title + "</h1>");
         out.println("</body>");
         out.println("</html>");

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestHeaderExample.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestHeaderExample.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestHeaderExample.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestHeaderExample.java Fri Jun  6 15:43:44 2008
@@ -18,10 +18,15 @@
  *
  */
 
-import java.io.*;
-import java.util.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Enumeration;
+import java.util.ResourceBundle;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import util.HTMLFilter;
 
@@ -34,11 +39,10 @@
 public class RequestHeaderExample extends HttpServlet {
 
     ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
-    
+
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
-        throws IOException, ServletException
-    {
+            throws IOException, ServletException {
         response.setContentType("text/html");
 
         PrintWriter out = response.getWriter();
@@ -51,24 +55,24 @@
         out.println("</head>");
         out.println("<body>");
 
-	// all links relative
+        // all links relative
 
         // XXX
         // making these absolute till we work out the
         // addition of a PathInfo issue 
-	
+
         out.println("<a href=\"../reqheaders.html\">");
         out.println("<img src=\"../images/code.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"view code\"></a>");
+                "width=24 align=right border=0 alt=\"view code\"></a>");
         out.println("<a href=\"../index.html\">");
         out.println("<img src=\"../images/return.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"return\"></a>");
+                "width=24 align=right border=0 alt=\"return\"></a>");
 
         out.println("<h3>" + title + "</h3>");
         out.println("<table border=0>");
         Enumeration e = request.getHeaderNames();
         while (e.hasMoreElements()) {
-            String headerName = (String)e.nextElement();
+            String headerName = (String) e.nextElement();
             String headerValue = request.getHeader(headerName);
             out.println("<tr><td bgcolor=\"#CCCCCC\">");
             out.println(HTMLFilter.filter(headerName));
@@ -80,9 +84,8 @@
     }
 
     public void doPost(HttpServletRequest request,
-                      HttpServletResponse response)
-        throws IOException, ServletException
-    {
+                       HttpServletResponse response)
+            throws IOException, ServletException {
         doGet(request, response);
     }
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestInfoExample.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestInfoExample.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestInfoExample.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestInfoExample.java Fri Jun  6 15:43:44 2008
@@ -18,10 +18,14 @@
  *
  */
 
-import java.io.*;
-import java.util.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ResourceBundle;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import util.HTMLFilter;
 
@@ -38,8 +42,7 @@
 
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
-        throws IOException, ServletException
-    {
+            throws IOException, ServletException {
         response.setContentType("text/html");
 
         PrintWriter out = response.getWriter();
@@ -53,18 +56,18 @@
         out.println("<body bgcolor=\"white\">");
 
         // img stuff not req'd for source code html showing
-	// all links relative!
+        // all links relative!
 
         // XXX
         // making these absolute till we work out the
         // addition of a PathInfo issue
-	
+
         out.println("<a href=\"../reqinfo.html\">");
         out.println("<img src=\"../images/code.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"view code\"></a>");
+                "width=24 align=right border=0 alt=\"view code\"></a>");
         out.println("<a href=\"../index.html\">");
         out.println("<img src=\"../images/return.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"return\"></a>");
+                "width=24 align=right border=0 alt=\"return\"></a>");
 
         out.println("<h3>" + title + "</h3>");
         out.println("<table border=0><tr><td>");
@@ -73,40 +76,39 @@
         out.println(request.getMethod());
         out.println("</td></tr><tr><td>");
         out.println(rb.getString("requestinfo.label.requesturi"));
-        out.println("</td><td>");        
+        out.println("</td><td>");
         out.println(HTMLFilter.filter(request.getRequestURI()));
-        out.println("</td></tr><tr><td>");        
+        out.println("</td></tr><tr><td>");
         out.println(rb.getString("requestinfo.label.protocol"));
-        out.println("</td><td>");        
+        out.println("</td><td>");
         out.println(request.getProtocol());
         out.println("</td></tr><tr><td>");
         out.println(rb.getString("requestinfo.label.pathinfo"));
-        out.println("</td><td>");        
+        out.println("</td><td>");
         out.println(HTMLFilter.filter(request.getPathInfo()));
         out.println("</td></tr><tr><td>");
         out.println(rb.getString("requestinfo.label.remoteaddr"));
 
- 	String cipherSuite=
- 	    (String)request.getAttribute("javax.servlet.request.cipher_suite");
-        out.println("</td><td>");                
+        String cipherSuite =
+                (String) request.getAttribute("javax.servlet.request.cipher_suite");
+        out.println("</td><td>");
         out.println(request.getRemoteAddr());
         out.println("</table>");
 
- 	if(cipherSuite!=null){
- 	    out.println("</td></tr><tr><td>");	
- 	    out.println("SSLCipherSuite:");
- 	    out.println("</td>");
- 	    out.println("<td>");	    
- 	    out.println(request.getAttribute("javax.servlet.request.cipher_suite"));
-	    out.println("</td>");	    
- 	}
-	
+        if (cipherSuite != null) {
+            out.println("</td></tr><tr><td>");
+            out.println("SSLCipherSuite:");
+            out.println("</td>");
+            out.println("<td>");
+            out.println(request.getAttribute("javax.servlet.request.cipher_suite"));
+            out.println("</td>");
+        }
+
     }
 
     public void doPost(HttpServletRequest request,
-                      HttpServletResponse response)
-        throws IOException, ServletException
-    {
+                       HttpServletResponse response)
+            throws IOException, ServletException {
         doGet(request, response);
     }
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestParamExample.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestParamExample.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestParamExample.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/RequestParamExample.java Fri Jun  6 15:43:44 2008
@@ -18,10 +18,14 @@
  *
  */
 
-import java.io.*;
-import java.util.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ResourceBundle;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import util.HTMLFilter;
 
@@ -35,11 +39,10 @@
 
 
     ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
-    
+
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
-        throws IOException, ServletException
-    {
+            throws IOException, ServletException {
         response.setContentType("text/html");
 
         PrintWriter out = response.getWriter();
@@ -54,18 +57,18 @@
 
         // img stuff not req'd for source code html showing
 
-	// all links relative
+        // all links relative
 
         // XXX
         // making these absolute till we work out the
         // addition of a PathInfo issue 
-	
+
         out.println("<a href=\"../reqparams.html\">");
         out.println("<img src=\"../images/code.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"view code\"></a>");
+                "width=24 align=right border=0 alt=\"view code\"></a>");
         out.println("<a href=\"../index.html\">");
         out.println("<img src=\"../images/return.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"return\"></a>");
+                "width=24 align=right border=0 alt=\"return\"></a>");
 
         out.println("<h3>" + title + "</h3>");
         String firstName = request.getParameter("firstname");
@@ -97,9 +100,8 @@
     }
 
     public void doPost(HttpServletRequest request,
-                      HttpServletResponse response)
-        throws IOException, ServletException
-    {
+                       HttpServletResponse response)
+            throws IOException, ServletException {
         doGet(request, response);
     }
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/SessionExample.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/SessionExample.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/SessionExample.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/SessionExample.java Fri Jun  6 15:43:44 2008
@@ -18,10 +18,17 @@
  *
  */
 
-import java.io.*;
-import java.util.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.ResourceBundle;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
 
 import util.HTMLFilter;
 
@@ -34,11 +41,10 @@
 public class SessionExample extends HttpServlet {
 
     ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
-    
+
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
-        throws IOException, ServletException
-    {
+            throws IOException, ServletException {
         response.setContentType("text/html");
 
         PrintWriter out = response.getWriter();
@@ -52,18 +58,18 @@
         out.println("<body>");
 
         // img stuff not req'd for source code html showing
-	// relative links everywhere!
+        // relative links everywhere!
 
         // XXX
         // making these absolute till we work out the
         // addition of a PathInfo issue 
-	
+
         out.println("<a href=\"../sessions.html\">");
         out.println("<img src=\"../images/code.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"view code\"></a>");
+                "width=24 align=right border=0 alt=\"view code\"></a>");
         out.println("<a href=\"../index.html\">");
         out.println("<img src=\"../images/return.gif\" height=24 " +
-                    "width=24 align=right border=0 alt=\"return\"></a>");
+                "width=24 align=right border=0 alt=\"return\"></a>");
 
         out.println("<h3>" + title + "</h3>");
 
@@ -85,15 +91,15 @@
         out.println(rb.getString("sessions.data") + "<br>");
         Enumeration names = session.getAttributeNames();
         while (names.hasMoreElements()) {
-            String name = (String) names.nextElement(); 
+            String name = (String) names.nextElement();
             String value = session.getAttribute(name).toString();
-            out.println(HTMLFilter.filter(name) + " = " 
-                        + HTMLFilter.filter(value) + "<br>");
+            out.println(HTMLFilter.filter(name) + " = "
+                    + HTMLFilter.filter(value) + "<br>");
         }
 
         out.println("<P>");
         out.print("<form action=\"");
-	out.print(response.encodeURL("SessionExample"));
+        out.print(response.encodeURL("SessionExample"));
         out.print("\" ");
         out.println("method=POST>");
         out.println(rb.getString("sessions.dataname"));
@@ -107,7 +113,7 @@
 
         out.println("<P>GET based form:<br>");
         out.print("<form action=\"");
-	out.print(response.encodeURL("SessionExample"));
+        out.print(response.encodeURL("SessionExample"));
         out.print("\" ");
         out.println("method=GET>");
         out.println(rb.getString("sessions.dataname"));
@@ -120,20 +126,19 @@
         out.println("</form>");
 
         out.print("<p><a href=\"");
-	out.print(response.encodeURL("SessionExample?dataname=foo&datavalue=bar"));
-	out.println("\" >URL encoded </a>");
-	
+        out.print(response.encodeURL("SessionExample?dataname=foo&datavalue=bar"));
+        out.println("\" >URL encoded </a>");
+
         out.println("</body>");
         out.println("</html>");
-        
+
         out.println("</body>");
         out.println("</html>");
     }
 
     public void doPost(HttpServletRequest request,
-                      HttpServletResponse response)
-        throws IOException, ServletException
-    {
+                       HttpServletResponse response)
+            throws IOException, ServletException {
         doGet(request, response);
     }
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionFilter.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionFilter.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionFilter.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionFilter.java Fri Jun  6 15:43:44 2008
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.util.Enumeration;
+
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
@@ -38,7 +39,7 @@
  * @version $Revision$, $Date$
  */
 
-public class CompressionFilter implements Filter{
+public class CompressionFilter implements Filter {
 
     /**
      * The filter configuration object we are associated with.  If this value
@@ -73,13 +74,13 @@
         config = filterConfig;
         if (filterConfig != null) {
             String value = filterConfig.getInitParameter("debug");
-            if (value!=null) {
+            if (value != null) {
                 debug = Integer.parseInt(value);
             } else {
                 debug = 0;
             }
             String str = filterConfig.getInitParameter("compressionThreshold");
-            if (str!=null) {
+            if (str != null) {
                 compressionThreshold = Integer.parseInt(str);
                 if (compressionThreshold != 0 && compressionThreshold < minThreshold) {
                     if (debug > 0) {
@@ -99,8 +100,8 @@
     }
 
     /**
-    * Take this filter out of service.
-    */
+     * Take this filter out of service.
+     */
     public void destroy() {
 
         this.config = null;
@@ -122,10 +123,10 @@
      * modifies the header if the content length is big enough.
      * It then invokes the next entity in the chain using the FilterChain object
      * (<code>chain.doFilter()</code>), <br>
-     **/
+     */
 
-    public void doFilter ( ServletRequest request, ServletResponse response,
-                        FilterChain chain ) throws IOException, ServletException {
+    public void doFilter(ServletRequest request, ServletResponse response,
+                         FilterChain chain) throws IOException, ServletException {
 
         if (debug > 0) {
             System.out.println("@doFilter");
@@ -142,11 +143,11 @@
         boolean supportCompression = false;
         if (request instanceof HttpServletRequest) {
             if (debug > 1) {
-                System.out.println("requestURI = " + ((HttpServletRequest)request).getRequestURI());
+                System.out.println("requestURI = " + ((HttpServletRequest) request).getRequestURI());
             }
 
             // Are we allowed to compress ?
-            String s = (String) ((HttpServletRequest)request).getParameter("gzip");
+            String s = (String) ((HttpServletRequest) request).getParameter("gzip");
             if ("false".equals(s)) {
                 if (debug > 0) {
                     System.out.println("got parameter gzip=false --> don't compress, just chain filter");
@@ -156,9 +157,9 @@
             }
 
             Enumeration e =
-                ((HttpServletRequest)request).getHeaders("Accept-Encoding");
+                    ((HttpServletRequest) request).getHeaders("Accept-Encoding");
             while (e.hasMoreElements()) {
-                String name = (String)e.nextElement();
+                String name = (String) e.nextElement();
                 if (name.indexOf("gzip") != -1) {
                     if (debug > 0) {
                         System.out.println("supports compression");
@@ -181,7 +182,7 @@
         } else {
             if (response instanceof HttpServletResponse) {
                 CompressionServletResponseWrapper wrappedResponse =
-                    new CompressionServletResponseWrapper((HttpServletResponse)response);
+                        new CompressionServletResponseWrapper((HttpServletResponse) response);
                 wrappedResponse.setDebugLevel(debug);
                 wrappedResponse.setCompressionThreshold(compressionThreshold);
                 if (debug > 0) {

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionFilterTestServlet.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionFilterTestServlet.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionFilterTestServlet.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionFilterTestServlet.java Fri Jun  6 15:43:44 2008
@@ -19,11 +19,16 @@
 
 import java.io.IOException;
 import java.util.Enumeration;
-import javax.servlet.*;
-import javax.servlet.http.*;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * Very Simple test servlet to test compression filter
+ *
  * @author Amy Roh
  * @version $Revision$, $Date$
  */
@@ -31,19 +36,18 @@
 public class CompressionFilterTestServlet extends HttpServlet {
 
     public void doGet(HttpServletRequest request, HttpServletResponse response)
-        throws ServletException, IOException {
+            throws ServletException, IOException {
 
         ServletOutputStream out = response.getOutputStream();
         response.setContentType("text/plain");
 
-        Enumeration e = ((HttpServletRequest)request).getHeaders("Accept-Encoding");
+        Enumeration e = ((HttpServletRequest) request).getHeaders("Accept-Encoding");
         while (e.hasMoreElements()) {
-            String name = (String)e.nextElement();
+            String name = (String) e.nextElement();
             out.println(name);
             if (name.indexOf("gzip") != -1) {
                 out.println("gzip supported -- able to compress");
-            }
-            else {
+            } else {
                 out.println("gzip not supported");
             }
         }

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionResponseStream.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionResponseStream.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionResponseStream.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionResponseStream.java Fri Jun  6 15:43:44 2008
@@ -18,6 +18,7 @@
 
 import java.io.IOException;
 import java.util.zip.GZIPOutputStream;
+
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
 
@@ -32,8 +33,7 @@
  */
 
 public class CompressionResponseStream
-    extends ServletOutputStream {
-
+        extends ServletOutputStream {
 
     // ----------------------------------------------------------- Constructors
 
@@ -43,7 +43,7 @@
      *
      * @param response The associated response
      */
-    public CompressionResponseStream(HttpServletResponse response) throws IOException{
+    public CompressionResponseStream(HttpServletResponse response) throws IOException {
 
         super();
         closed = false;
@@ -52,7 +52,6 @@
 
     }
 
-
     // ----------------------------------------------------- Instance Variables
 
 
@@ -103,7 +102,6 @@
      */
     protected ServletOutputStream output = null;
 
-
     // --------------------------------------------------------- Public Methods
 
     /**
@@ -121,7 +119,7 @@
         compressionThreshold = threshold;
         buffer = new byte[compressionThreshold];
         if (debug > 1) {
-            System.out.println("buffer is set to "+compressionThreshold);
+            System.out.println("buffer is set to " + compressionThreshold);
         }
     }
 
@@ -197,13 +195,12 @@
      * Write the specified byte to our output stream.
      *
      * @param b The byte to be written
-     *
-     * @exception IOException if an input/output error occurs
+     * @throws IOException if an input/output error occurs
      */
     public void write(int b) throws IOException {
 
         if (debug > 1) {
-            System.out.println("write "+b+" in CompressionResponseStream ");
+            System.out.println("write " + b + " in CompressionResponseStream ");
         }
         if (closed)
             throw new IOException("Cannot write to a closed output stream");
@@ -222,8 +219,7 @@
      * to our output stream.
      *
      * @param b The byte array to be written
-     *
-     * @exception IOException if an input/output error occurs
+     * @throws IOException if an input/output error occurs
      */
     public void write(byte b[]) throws IOException {
 
@@ -236,11 +232,10 @@
      * Write <code>len</code> bytes from the specified byte array, starting
      * at the specified offset, to our output stream.
      *
-     * @param b The byte array containing the bytes to be written
+     * @param b   The byte array containing the bytes to be written
      * @param off Zero-relative starting offset of the bytes to be written
      * @param len The number of bytes to be written
-     *
-     * @exception IOException if an input/output error occurs
+     * @throws IOException if an input/output error occurs
      */
     public void write(byte b[], int off, int len) throws IOException {
 
@@ -301,7 +296,6 @@
 
     }
 
-
     // -------------------------------------------------------- Package Methods
 
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionServletResponseWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionServletResponseWrapper.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionServletResponseWrapper.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/compressionFilters/CompressionServletResponseWrapper.java Fri Jun  6 15:43:44 2008
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
+
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponseWrapper;
@@ -49,7 +50,6 @@
         }
     }
 
-
     // ----------------------------------------------------- Instance Variables
 
     /**
@@ -102,7 +102,7 @@
      */
     public void setContentType(String contentType) {
         if (debug > 1) {
-            System.out.println("setContentType to "+contentType);
+            System.out.println("setContentType to " + contentType);
         }
         this.contentType = contentType;
         origResponse.setContentType(contentType);
@@ -132,7 +132,7 @@
      * Create and return a ServletOutputStream to write the content
      * associated with this Response.
      *
-     * @exception IOException if an input/output error occurs
+     * @throws IOException if an input/output error occurs
      */
     public ServletOutputStream createOutputStream() throws IOException {
         if (debug > 1) {
@@ -163,29 +163,28 @@
         }
     }
 
-
     // ------------------------------------------------ ServletResponse Methods
 
 
     /**
      * Flush the buffer and commit this response.
      *
-     * @exception IOException if an input/output error occurs
+     * @throws IOException if an input/output error occurs
      */
     public void flushBuffer() throws IOException {
         if (debug > 1) {
             System.out.println("flush buffer @ CompressionServletResponseWrapper");
         }
-        ((CompressionResponseStream)stream).flush();
+        ((CompressionResponseStream) stream).flush();
 
     }
 
     /**
      * Return the servlet output stream associated with this Response.
      *
-     * @exception IllegalStateException if <code>getWriter</code> has
-     *  already been called for this response
-     * @exception IOException if an input/output error occurs
+     * @throws IllegalStateException if <code>getWriter</code> has
+     *                               already been called for this response
+     * @throws IOException           if an input/output error occurs
      */
     public ServletOutputStream getOutputStream() throws IOException {
 
@@ -195,7 +194,7 @@
         if (stream == null)
             stream = createOutputStream();
         if (debug > 1) {
-            System.out.println("stream is set to "+stream+" in getOutputStream");
+            System.out.println("stream is set to " + stream + " in getOutputStream");
         }
 
         return (stream);
@@ -205,9 +204,9 @@
     /**
      * Return the writer associated with this Response.
      *
-     * @exception IllegalStateException if <code>getOutputStream</code> has
-     *  already been called for this response
-     * @exception IOException if an input/output error occurs
+     * @throws IllegalStateException if <code>getOutputStream</code> has
+     *                               already been called for this response
+     * @throws IOException           if an input/output error occurs
      */
     public PrintWriter getWriter() throws IOException {
 
@@ -219,7 +218,7 @@
 
         stream = createOutputStream();
         if (debug > 1) {
-            System.out.println("stream is set to "+stream+" in getWriter");
+            System.out.println("stream is set to " + stream + " in getWriter");
         }
         //String charset = getCharsetFromContentType(contentType);
         String charEnc = origResponse.getCharacterEncoding();
@@ -233,7 +232,7 @@
         } else {
             writer = new PrintWriter(stream);
         }
-        
+
         return (writer);
 
     }
@@ -245,6 +244,7 @@
 
     /**
      * Returns character from content type. This method was taken from tomcat.
+     *
      * @author rajo
      */
     private static String getCharsetFromContentType(String type) {
@@ -258,7 +258,7 @@
         }
         String afterSemi = type.substring(semi + 1);
         int charsetLocation = afterSemi.indexOf("charset=");
-        if(charsetLocation == -1) {
+        if (charsetLocation == -1) {
             return null;
         } else {
             String afterCharset = afterSemi.substring(charsetLocation + 8);

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/ExampleFilter.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/ExampleFilter.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/ExampleFilter.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/ExampleFilter.java Fri Jun  6 15:43:44 2008
@@ -19,6 +19,7 @@
 
 
 import java.io.IOException;
+
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
@@ -32,12 +33,12 @@
  * or to a URL pattern.  This filter performs the following functions:
  * <ul>
  * <li>Attaches itself as a request attribute, under the attribute name
- *     defined by the value of the <code>attribute</code> initialization
- *     parameter.</li>
+ * defined by the value of the <code>attribute</code> initialization
+ * parameter.</li>
  * <li>Calculates the number of milliseconds required to perform the
- *     servlet processing required by this request, including any
- *     subsequently defined filters, and logs the result to the servlet
- *     context log for this application.
+ * servlet processing required by this request, including any
+ * subsequently defined filters, and logs the result to the servlet
+ * context log for this application.
  * </ul>
  *
  * @author Craig McClanahan
@@ -46,7 +47,6 @@
 
 public final class ExampleFilter implements Filter {
 
-
     // ----------------------------------------------------- Instance Variables
 
 
@@ -62,7 +62,6 @@
      */
     private FilterConfig filterConfig = null;
 
-
     // --------------------------------------------------------- Public Methods
 
 
@@ -82,27 +81,26 @@
      * current filter stack, including the ultimately invoked servlet.
      *
      * @param request The servlet request we are processing
-     * @param result The servlet response we are creating
-     * @param chain The filter chain we are processing
-     *
-     * @exception IOException if an input/output error occurs
-     * @exception ServletException if a servlet error occurs
+     * @param result  The servlet response we are creating
+     * @param chain   The filter chain we are processing
+     * @throws IOException      if an input/output error occurs
+     * @throws ServletException if a servlet error occurs
      */
     public void doFilter(ServletRequest request, ServletResponse response,
                          FilterChain chain)
-	throws IOException, ServletException {
+            throws IOException, ServletException {
 
-	// Store ourselves as a request attribute (if requested)
-	if (attribute != null)
-	    request.setAttribute(attribute, this);
+        // Store ourselves as a request attribute (if requested)
+        if (attribute != null)
+            request.setAttribute(attribute, this);
 
-	// Time and log the subsequent processing
-	long startTime = System.currentTimeMillis();
+        // Time and log the subsequent processing
+        long startTime = System.currentTimeMillis();
         chain.doFilter(request, response);
-	long stopTime = System.currentTimeMillis();
-	filterConfig.getServletContext().log
-	    (this.toString() + ": " + (stopTime - startTime) +
-	     " milliseconds");
+        long stopTime = System.currentTimeMillis();
+        filterConfig.getServletContext().log
+                (this.toString() + ": " + (stopTime - startTime) +
+                        " milliseconds");
 
     }
 
@@ -114,7 +112,7 @@
      */
     public void init(FilterConfig filterConfig) throws ServletException {
 
-	this.filterConfig = filterConfig;
+        this.filterConfig = filterConfig;
         this.attribute = filterConfig.getInitParameter("attribute");
 
     }
@@ -125,12 +123,12 @@
      */
     public String toString() {
 
-	if (filterConfig == null)
-	    return ("InvokerFilter()");
-	StringBuffer sb = new StringBuffer("InvokerFilter(");
-	sb.append(filterConfig);
-	sb.append(")");
-	return (sb.toString());
+        if (filterConfig == null)
+            return ("InvokerFilter()");
+        StringBuffer sb = new StringBuffer("InvokerFilter(");
+        sb.append(filterConfig);
+        sb.append(")");
+        return (sb.toString());
 
     }
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/RequestDumperFilter.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/RequestDumperFilter.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/RequestDumperFilter.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/RequestDumperFilter.java Fri Jun  6 15:43:44 2008
@@ -25,6 +25,7 @@
 import java.sql.Timestamp;
 import java.util.Enumeration;
 import java.util.Locale;
+
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
@@ -47,7 +48,6 @@
 
 public final class RequestDumperFilter implements Filter {
 
-
     // ----------------------------------------------------- Instance Variables
 
 
@@ -57,7 +57,6 @@
      */
     private FilterConfig filterConfig = null;
 
-
     // --------------------------------------------------------- Public Methods
 
 
@@ -76,94 +75,93 @@
      * current filter stack, including the ultimately invoked servlet.
      *
      * @param request The servlet request we are processing
-     * @param result The servlet response we are creating
-     * @param chain The filter chain we are processing
-     *
-     * @exception IOException if an input/output error occurs
-     * @exception ServletException if a servlet error occurs
+     * @param result  The servlet response we are creating
+     * @param chain   The filter chain we are processing
+     * @throws IOException      if an input/output error occurs
+     * @throws ServletException if a servlet error occurs
      */
     public void doFilter(ServletRequest request, ServletResponse response,
                          FilterChain chain)
-	throws IOException, ServletException {
+            throws IOException, ServletException {
 
         if (filterConfig == null)
-	    return;
+            return;
 
-	// Render the generic servlet request properties
-	StringWriter sw = new StringWriter();
-	PrintWriter writer = new PrintWriter(sw);
-	writer.println("Request Received at " +
-		       (new Timestamp(System.currentTimeMillis())));
-	writer.println(" characterEncoding=" + request.getCharacterEncoding());
-	writer.println("     contentLength=" + request.getContentLength());
-	writer.println("       contentType=" + request.getContentType());
-	writer.println("            locale=" + request.getLocale());
-	writer.print("           locales=");
-	Enumeration locales = request.getLocales();
-	boolean first = true;
-	while (locales.hasMoreElements()) {
-	    Locale locale = (Locale) locales.nextElement();
-	    if (first)
-	        first = false;
-	    else
-	        writer.print(", ");
-	    writer.print(locale.toString());
-	}
-	writer.println();
-	Enumeration names = request.getParameterNames();
-	while (names.hasMoreElements()) {
-	    String name = (String) names.nextElement();
-	    writer.print("         parameter=" + name + "=");
-	    String values[] = request.getParameterValues(name);
-	    for (int i = 0; i < values.length; i++) {
-	        if (i > 0)
-		    writer.print(", ");
-		writer.print(values[i]);
-	    }
-	    writer.println();
-	}
-	writer.println("          protocol=" + request.getProtocol());
-	writer.println("        remoteAddr=" + request.getRemoteAddr());
-	writer.println("        remoteHost=" + request.getRemoteHost());
-	writer.println("            scheme=" + request.getScheme());
-	writer.println("        serverName=" + request.getServerName());
-	writer.println("        serverPort=" + request.getServerPort());
-	writer.println("          isSecure=" + request.isSecure());
-
-	// Render the HTTP servlet request properties
-	if (request instanceof HttpServletRequest) {
-	    writer.println("---------------------------------------------");
-	    HttpServletRequest hrequest = (HttpServletRequest) request;
-	    writer.println("       contextPath=" + hrequest.getContextPath());
-	    Cookie cookies[] = hrequest.getCookies();
+        // Render the generic servlet request properties
+        StringWriter sw = new StringWriter();
+        PrintWriter writer = new PrintWriter(sw);
+        writer.println("Request Received at " +
+                (new Timestamp(System.currentTimeMillis())));
+        writer.println(" characterEncoding=" + request.getCharacterEncoding());
+        writer.println("     contentLength=" + request.getContentLength());
+        writer.println("       contentType=" + request.getContentType());
+        writer.println("            locale=" + request.getLocale());
+        writer.print("           locales=");
+        Enumeration locales = request.getLocales();
+        boolean first = true;
+        while (locales.hasMoreElements()) {
+            Locale locale = (Locale) locales.nextElement();
+            if (first)
+                first = false;
+            else
+                writer.print(", ");
+            writer.print(locale.toString());
+        }
+        writer.println();
+        Enumeration names = request.getParameterNames();
+        while (names.hasMoreElements()) {
+            String name = (String) names.nextElement();
+            writer.print("         parameter=" + name + "=");
+            String values[] = request.getParameterValues(name);
+            for (int i = 0; i < values.length; i++) {
+                if (i > 0)
+                    writer.print(", ");
+                writer.print(values[i]);
+            }
+            writer.println();
+        }
+        writer.println("          protocol=" + request.getProtocol());
+        writer.println("        remoteAddr=" + request.getRemoteAddr());
+        writer.println("        remoteHost=" + request.getRemoteHost());
+        writer.println("            scheme=" + request.getScheme());
+        writer.println("        serverName=" + request.getServerName());
+        writer.println("        serverPort=" + request.getServerPort());
+        writer.println("          isSecure=" + request.isSecure());
+
+        // Render the HTTP servlet request properties
+        if (request instanceof HttpServletRequest) {
+            writer.println("---------------------------------------------");
+            HttpServletRequest hrequest = (HttpServletRequest) request;
+            writer.println("       contextPath=" + hrequest.getContextPath());
+            Cookie cookies[] = hrequest.getCookies();
             if (cookies == null)
                 cookies = new Cookie[0];
-	    for (int i = 0; i < cookies.length; i++) {
-	        writer.println("            cookie=" + cookies[i].getName() +
-			       "=" + cookies[i].getValue());
-	    }
-	    names = hrequest.getHeaderNames();
-	    while (names.hasMoreElements()) {
-	        String name = (String) names.nextElement();
-		String value = hrequest.getHeader(name);
-	        writer.println("            header=" + name + "=" + value);
-	    }
-	    writer.println("            method=" + hrequest.getMethod());
-	    writer.println("          pathInfo=" + hrequest.getPathInfo());
-	    writer.println("       queryString=" + hrequest.getQueryString());
-	    writer.println("        remoteUser=" + hrequest.getRemoteUser());
-	    writer.println("requestedSessionId=" +
-			   hrequest.getRequestedSessionId());
-	    writer.println("        requestURI=" + hrequest.getRequestURI());
-	    writer.println("       servletPath=" + hrequest.getServletPath());
-	}
-	writer.println("=============================================");
-
-	// Log the resulting string
-	writer.flush();
-	filterConfig.getServletContext().log(sw.getBuffer().toString());
+            for (int i = 0; i < cookies.length; i++) {
+                writer.println("            cookie=" + cookies[i].getName() +
+                        "=" + cookies[i].getValue());
+            }
+            names = hrequest.getHeaderNames();
+            while (names.hasMoreElements()) {
+                String name = (String) names.nextElement();
+                String value = hrequest.getHeader(name);
+                writer.println("            header=" + name + "=" + value);
+            }
+            writer.println("            method=" + hrequest.getMethod());
+            writer.println("          pathInfo=" + hrequest.getPathInfo());
+            writer.println("       queryString=" + hrequest.getQueryString());
+            writer.println("        remoteUser=" + hrequest.getRemoteUser());
+            writer.println("requestedSessionId=" +
+                    hrequest.getRequestedSessionId());
+            writer.println("        requestURI=" + hrequest.getRequestURI());
+            writer.println("       servletPath=" + hrequest.getServletPath());
+        }
+        writer.println("=============================================");
+
+        // Log the resulting string
+        writer.flush();
+        filterConfig.getServletContext().log(sw.getBuffer().toString());
 
-	// Pass control on to the next filter
+        // Pass control on to the next filter
         chain.doFilter(request, response);
 
     }
@@ -176,7 +174,7 @@
      */
     public void init(FilterConfig filterConfig) throws ServletException {
 
-	this.filterConfig = filterConfig;
+        this.filterConfig = filterConfig;
 
     }
 
@@ -186,12 +184,12 @@
      */
     public String toString() {
 
-	if (filterConfig == null)
-	    return ("RequestDumperFilter()");
-	StringBuffer sb = new StringBuffer("RequestDumperFilter(");
-	sb.append(filterConfig);
-	sb.append(")");
-	return (sb.toString());
+        if (filterConfig == null)
+            return ("RequestDumperFilter()");
+        StringBuffer sb = new StringBuffer("RequestDumperFilter(");
+        sb.append(filterConfig);
+        sb.append(")");
+        return (sb.toString());
 
     }
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/SetCharacterEncodingFilter.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/SetCharacterEncodingFilter.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/SetCharacterEncodingFilter.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/filters/SetCharacterEncodingFilter.java Fri Jun  6 15:43:44 2008
@@ -19,6 +19,7 @@
 
 
 import java.io.IOException;
+
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
@@ -34,17 +35,17 @@
  * the following initialization parameters:</p>
  * <ul>
  * <li><strong>encoding</strong> - The character encoding to be configured
- *     for this request, either conditionally or unconditionally based on
- *     the <code>ignore</code> initialization parameter.  This parameter
- *     is required, so there is no default.</li>
+ * for this request, either conditionally or unconditionally based on
+ * the <code>ignore</code> initialization parameter.  This parameter
+ * is required, so there is no default.</li>
  * <li><strong>ignore</strong> - If set to "true", any character encoding
- *     specified by the client is ignored, and the value returned by the
- *     <code>selectEncoding()</code> method is set.  If set to "false,
- *     <code>selectEncoding()</code> is called <strong>only</strong> if the
- *     client has not already specified an encoding.  By default, this
- *     parameter is set to "true".</li>
+ * specified by the client is ignored, and the value returned by the
+ * <code>selectEncoding()</code> method is set.  If set to "false,
+ * <code>selectEncoding()</code> is called <strong>only</strong> if the
+ * client has not already specified an encoding.  By default, this
+ * parameter is set to "true".</li>
  * </ul>
- *
+ * <p/>
  * <p>Although this filter can be used unchanged, it is also easy to
  * subclass it and make the <code>selectEncoding()</code> method more
  * intelligent about what encoding to choose, based on characteristics of
@@ -58,7 +59,6 @@
 
 public class SetCharacterEncodingFilter implements Filter {
 
-
     // ----------------------------------------------------- Instance Variables
 
 
@@ -81,7 +81,6 @@
      */
     protected boolean ignore = true;
 
-
     // --------------------------------------------------------- Public Methods
 
 
@@ -101,15 +100,14 @@
      * interpret request parameters for this request.
      *
      * @param request The servlet request we are processing
-     * @param result The servlet response we are creating
-     * @param chain The filter chain we are processing
-     *
-     * @exception IOException if an input/output error occurs
-     * @exception ServletException if a servlet error occurs
+     * @param result  The servlet response we are creating
+     * @param chain   The filter chain we are processing
+     * @throws IOException      if an input/output error occurs
+     * @throws ServletException if a servlet error occurs
      */
     public void doFilter(ServletRequest request, ServletResponse response,
                          FilterChain chain)
-	throws IOException, ServletException {
+            throws IOException, ServletException {
 
         // Conditionally select and set the character encoding to be used
         if (ignore || (request.getCharacterEncoding() == null)) {
@@ -118,7 +116,7 @@
                 request.setCharacterEncoding(encoding);
         }
 
-	// Pass control on to the next filter
+        // Pass control on to the next filter
         chain.doFilter(request, response);
 
     }
@@ -131,7 +129,7 @@
      */
     public void init(FilterConfig filterConfig) throws ServletException {
 
-	this.filterConfig = filterConfig;
+        this.filterConfig = filterConfig;
         this.encoding = filterConfig.getInitParameter("encoding");
         String value = filterConfig.getInitParameter("ignore");
         if (value == null)
@@ -145,7 +143,6 @@
 
     }
 
-
     // ------------------------------------------------------ Protected Methods
 
 
@@ -154,7 +151,7 @@
      * characteristics of the current request and/or filter initialization
      * parameters.  If no character encoding should be set, return
      * <code>null</code>.
-     * <p>
+     * <p/>
      * The default implementation unconditionally returns the value configured
      * by the <strong>encoding</strong> initialization parameter for this
      * filter.

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/listeners/ContextListener.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/listeners/ContextListener.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/listeners/ContextListener.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/listeners/ContextListener.java Fri Jun  6 15:43:44 2008
@@ -36,8 +36,7 @@
  */
 
 public final class ContextListener
-    implements ServletContextAttributeListener, ServletContextListener {
-
+        implements ServletContextAttributeListener, ServletContextListener {
 
     // ----------------------------------------------------- Instance Variables
 
@@ -47,7 +46,6 @@
      */
     private ServletContext context = null;
 
-
     // --------------------------------------------------------- Public Methods
 
 
@@ -58,8 +56,8 @@
      */
     public void attributeAdded(ServletContextAttributeEvent event) {
 
-	log("attributeAdded('" + event.getName() + "', '" +
-	    event.getValue() + "')");
+        log("attributeAdded('" + event.getName() + "', '" +
+                event.getValue() + "')");
 
     }
 
@@ -71,8 +69,8 @@
      */
     public void attributeRemoved(ServletContextAttributeEvent event) {
 
-	log("attributeRemoved('" + event.getName() + "', '" +
-	    event.getValue() + "')");
+        log("attributeRemoved('" + event.getName() + "', '" +
+                event.getValue() + "')");
 
     }
 
@@ -84,8 +82,8 @@
      */
     public void attributeReplaced(ServletContextAttributeEvent event) {
 
-	log("attributeReplaced('" + event.getName() + "', '" +
-	    event.getValue() + "')");
+        log("attributeReplaced('" + event.getName() + "', '" +
+                event.getValue() + "')");
 
     }
 
@@ -97,8 +95,8 @@
      */
     public void contextDestroyed(ServletContextEvent event) {
 
-	log("contextDestroyed()");
-	this.context = null;
+        log("contextDestroyed()");
+        this.context = null;
 
     }
 
@@ -110,12 +108,11 @@
      */
     public void contextInitialized(ServletContextEvent event) {
 
-	this.context = event.getServletContext();
-	log("contextInitialized()");
+        this.context = event.getServletContext();
+        log("contextInitialized()");
 
     }
 
-
     // -------------------------------------------------------- Private Methods
 
 
@@ -126,10 +123,10 @@
      */
     private void log(String message) {
 
-	if (context != null)
-	    context.log("ContextListener: " + message);
-	else
-	    System.out.println("ContextListener: " + message);
+        if (context != null)
+            context.log("ContextListener: " + message);
+        else
+            System.out.println("ContextListener: " + message);
 
     }
 
@@ -138,17 +135,17 @@
      * Log a message and associated exception to the servlet context
      * application log.
      *
-     * @param message Message to be logged
+     * @param message   Message to be logged
      * @param throwable Exception to be logged
      */
     private void log(String message, Throwable throwable) {
 
-	if (context != null)
-	    context.log("ContextListener: " + message, throwable);
-	else {
-	    System.out.println("ContextListener: " + message);
-	    throwable.printStackTrace(System.out);
-	}
+        if (context != null)
+            context.log("ContextListener: " + message, throwable);
+        else {
+            System.out.println("ContextListener: " + message);
+            throwable.printStackTrace(System.out);
+        }
 
     }
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/listeners/SessionListener.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/listeners/SessionListener.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/listeners/SessionListener.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/listeners/SessionListener.java Fri Jun  6 15:43:44 2008
@@ -38,9 +38,8 @@
  */
 
 public final class SessionListener
-    implements ServletContextListener,
-	       HttpSessionAttributeListener, HttpSessionListener {
-
+        implements ServletContextListener,
+        HttpSessionAttributeListener, HttpSessionListener {
 
     // ----------------------------------------------------- Instance Variables
 
@@ -50,7 +49,6 @@
      */
     private ServletContext context = null;
 
-
     // --------------------------------------------------------- Public Methods
 
 
@@ -61,8 +59,8 @@
      */
     public void attributeAdded(HttpSessionBindingEvent event) {
 
-	log("attributeAdded('" + event.getSession().getId() + "', '" +
-	    event.getName() + "', '" + event.getValue() + "')");
+        log("attributeAdded('" + event.getSession().getId() + "', '" +
+                event.getName() + "', '" + event.getValue() + "')");
 
     }
 
@@ -74,8 +72,8 @@
      */
     public void attributeRemoved(HttpSessionBindingEvent event) {
 
-	log("attributeRemoved('" + event.getSession().getId() + "', '" +
-	    event.getName() + "', '" + event.getValue() + "')");
+        log("attributeRemoved('" + event.getSession().getId() + "', '" +
+                event.getName() + "', '" + event.getValue() + "')");
 
     }
 
@@ -87,8 +85,8 @@
      */
     public void attributeReplaced(HttpSessionBindingEvent event) {
 
-	log("attributeReplaced('" + event.getSession().getId() + "', '" +
-	    event.getName() + "', '" + event.getValue() + "')");
+        log("attributeReplaced('" + event.getSession().getId() + "', '" +
+                event.getName() + "', '" + event.getValue() + "')");
 
     }
 
@@ -100,8 +98,8 @@
      */
     public void contextDestroyed(ServletContextEvent event) {
 
-	log("contextDestroyed()");
-	this.context = null;
+        log("contextDestroyed()");
+        this.context = null;
 
     }
 
@@ -113,8 +111,8 @@
      */
     public void contextInitialized(ServletContextEvent event) {
 
-	this.context = event.getServletContext();
-	log("contextInitialized()");
+        this.context = event.getServletContext();
+        log("contextInitialized()");
 
     }
 
@@ -126,7 +124,7 @@
      */
     public void sessionCreated(HttpSessionEvent event) {
 
-	log("sessionCreated('" + event.getSession().getId() + "')");
+        log("sessionCreated('" + event.getSession().getId() + "')");
 
     }
 
@@ -138,11 +136,10 @@
      */
     public void sessionDestroyed(HttpSessionEvent event) {
 
-	log("sessionDestroyed('" + event.getSession().getId() + "')");
+        log("sessionDestroyed('" + event.getSession().getId() + "')");
 
     }
 
-
     // -------------------------------------------------------- Private Methods
 
 
@@ -153,10 +150,10 @@
      */
     private void log(String message) {
 
-	if (context != null)
-	    context.log("SessionListener: " + message);
-	else
-	    System.out.println("SessionListener: " + message);
+        if (context != null)
+            context.log("SessionListener: " + message);
+        else
+            System.out.println("SessionListener: " + message);
 
     }
 
@@ -165,17 +162,17 @@
      * Log a message and associated exception to the servlet context
      * application log.
      *
-     * @param message Message to be logged
+     * @param message   Message to be logged
      * @param throwable Exception to be logged
      */
     private void log(String message, Throwable throwable) {
 
-	if (context != null)
-	    context.log("SessionListener: " + message, throwable);
-	else {
-	    System.out.println("SessionListener: " + message);
-	    throwable.printStackTrace(System.out);
-	}
+        if (context != null)
+            context.log("SessionListener: " + message, throwable);
+        else {
+            System.out.println("SessionListener: " + message);
+            throwable.printStackTrace(System.out);
+        }
 
     }
 

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/util/HTMLFilter.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/util/HTMLFilter.java?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/util/HTMLFilter.java (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/java/util/HTMLFilter.java Fri Jun  6 15:43:44 2008
@@ -44,20 +44,20 @@
         StringBuffer result = new StringBuffer(content.length + 50);
         for (int i = 0; i < content.length; i++) {
             switch (content[i]) {
-            case '<':
-                result.append("&lt;");
-                break;
-            case '>':
-                result.append("&gt;");
-                break;
-            case '&':
-                result.append("&amp;");
-                break;
-            case '"':
-                result.append("&quot;");
-                break;
-            default:
-                result.append(content[i]);
+                case '<':
+                    result.append("&lt;");
+                    break;
+                case '>':
+                    result.append("&gt;");
+                    break;
+                case '&':
+                    result.append("&amp;");
+                    break;
+                case '"':
+                    result.append("&quot;");
+                    break;
+                default:
+                    result.append(content[i]);
             }
         }
         return (result.toString());

Modified: geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/webapp/WEB-INF/geronimo-web.xml?rev=664175&r1=664174&r2=664175&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/webapp/WEB-INF/geronimo-web.xml (original)
+++ geronimo/samples/branches/2.1/samples/servlet-examples/servlet-examples-war/src/main/webapp/WEB-INF/geronimo-web.xml Fri Jun  6 15:43:44 2008
@@ -21,31 +21,31 @@
          xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2"
          xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
 
-  <dep:environment>
-    <dep:moduleId>
-      <dep:groupId>${pom.groupId}</dep:groupId>
-      <dep:artifactId>${pom.artifactId}</dep:artifactId>
-      <dep:version>${version}</dep:version>
-      <dep:type>war</dep:type>
-    </dep:moduleId>
-    <dep:dependencies/>
-    <dep:hidden-classes/>
-    <dep:non-overridable-classes/>
-  </dep:environment>
+    <dep:environment>
+        <dep:moduleId>
+            <dep:groupId>${pom.groupId}</dep:groupId>
+            <dep:artifactId>${pom.artifactId}</dep:artifactId>
+            <dep:version>${version}</dep:version>
+            <dep:type>war</dep:type>
+        </dep:moduleId>
+        <dep:dependencies/>
+        <dep:hidden-classes/>
+        <dep:non-overridable-classes/>
+    </dep:environment>
 
-  <context-root>/servlet-examples</context-root>
-  <!--<context-priority-classloader>false</context-priority-classloader>-->
-  <security-realm-name>geronimo-admin</security-realm-name>
-  <sec:security>
-      <sec:default-principal>
-          <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"
-                         name="anonymous"/>
-      </sec:default-principal>
-      <sec:role-mappings>
-          <sec:role role-name="tomcat">
-              <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
-                             name="admin"/>
-          </sec:role>
-      </sec:role-mappings>
-  </sec:security>
+    <context-root>/servlet-examples</context-root>
+    <!--<context-priority-classloader>false</context-priority-classloader>-->
+    <security-realm-name>geronimo-admin</security-realm-name>
+    <sec:security>
+        <sec:default-principal>
+            <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"
+                           name="anonymous"/>
+        </sec:default-principal>
+        <sec:role-mappings>
+            <sec:role role-name="tomcat">
+                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
+                               name="admin"/>
+            </sec:role>
+        </sec:role-mappings>
+    </sec:security>
 </web-app>
\ No newline at end of file