You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/07/24 14:23:45 UTC

svn commit: r978861 - in /tomcat/trunk: ./ test/org/apache/catalina/loader/ test/org/apache/catalina/mbeans/ test/org/apache/catalina/tribes/test/interceptors/ test/org/apache/catalina/tribes/test/membership/ webapps/docs/appdev/sample/src/mypackage/ w...

Author: markt
Date: Sat Jul 24 12:23:44 2010
New Revision: 978861

URL: http://svn.apache.org/viewvc?rev=978861&view=rev
Log:
Extend checks to webapps
Tab police for /test and /webapps

Modified:
    tomcat/trunk/build.xml
    tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
    tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
    tomcat/trunk/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java
    tomcat/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberSerialization.java
    tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/CookieExample.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/error/Smart.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/examples/ShowSource.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/el/Functions.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/FindBookSimpleTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/HelloWorldSimpleTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/TileSimpleTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/ContextListener.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/SessionListener.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/servletToJsp.java

Modified: tomcat/trunk/build.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Sat Jul 24 12:23:44 2010
@@ -421,6 +421,9 @@
       <fileset dir="test">
         <include name="**/*.java" />
       </fileset>
+      <fileset dir="webapps">
+        <include name="**/*.java" />
+      </fileset>
   	</checkstyle>
   </target>
 

Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java Sat Jul 24 12:23:44 2010
@@ -56,9 +56,9 @@ public class TestWebappClassLoaderMemory
         
         // If the thread still exists, we have a thread/memory leak
         try {
-	    Thread.sleep(10);
+            Thread.sleep(10);
         } catch(InterruptedException ie) {
-	    // ignore
+            // ignore
         }
         Thread[] threads = getThreads();
         for (Thread thread : threads) {

Modified: tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java (original)
+++ tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java Sat Jul 24 12:23:44 2010
@@ -39,8 +39,8 @@ public class TestRegistration extends To
      * registered.
      * @author Marc Guillemot
      */
-	public void testMBeanDeregistration() throws Exception {
-		final MBeanServer mbeanServer = Registry.getRegistry(null, null).getMBeanServer();
+    public void testMBeanDeregistration() throws Exception {
+        final MBeanServer mbeanServer = Registry.getRegistry(null, null).getMBeanServer();
         Set<ObjectName> onames = mbeanServer.queryNames(new ObjectName("Catalina:*"), null);
         assertEquals("Remaining: " + onames, 0, onames.size());
 
@@ -88,6 +88,6 @@ public class TestRegistration extends To
         assertEquals("Remaining: " + onames, 0, onames.size());
         onames = mbeanServer.queryNames(new ObjectName("Tomcat:*"), null);
         assertEquals("Remaining: " + onames, 0, onames.size());
-	}
-	
+    }
+    
 }

Modified: tomcat/trunk/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java (original)
+++ tomcat/trunk/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java Sat Jul 24 12:23:44 2010
@@ -119,8 +119,8 @@ public class TestOrderInterceptor extend
             threads[i].join();
         }
         if (!exceptionQueue.isEmpty()) {
-        	fail("Exception while sending in threads: " 
-        			+ exceptionQueue.remove().toString());
+            fail("Exception while sending in threads: " 
+                    + exceptionQueue.remove().toString());
         }
         Thread.sleep(5000);
         for ( int i=0; i<test.length; i++ ) {

Modified: tomcat/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberSerialization.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberSerialization.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberSerialization.java (original)
+++ tomcat/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberSerialization.java Sat Jul 24 12:23:44 2010
@@ -63,16 +63,14 @@ public class TestMemberSerialization ext
     }
     
     public void testUdpPort() throws Exception {
-    	byte[] md1 = m1.getData();
-    	byte[] md2 = m2.getData();
+        byte[] md1 = m1.getData();
+        byte[] md2 = m2.getData();
 
         MemberImpl a1 = MemberImpl.getMember(md1);
         MemberImpl a2 = MemberImpl.getMember(md2);
         
         assertEquals(true, a1.getUdpPort()==a2.getUdpPort());
         assertEquals(true,a1.getUdpPort()==udpPort);
-
-    	
     }
     
     public void testSerializationOne() throws Exception {

Modified: tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java (original)
+++ tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java Sat Jul 24 12:23:44 2010
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package mypackage;
 
 import java.io.IOException;
@@ -52,30 +51,30 @@ public final class Hello extends HttpSer
                       HttpServletResponse response)
       throws IOException, ServletException {
 
-	response.setContentType("text/html");
-	PrintWriter writer = response.getWriter();
+        response.setContentType("text/html");
+        PrintWriter writer = response.getWriter();
 
-	writer.println("<html>");
-	writer.println("<head>");
-	writer.println("<title>Sample Application Servlet Page</title>");
-	writer.println("</head>");
-	writer.println("<body bgcolor=white>");
-
-	writer.println("<table border=\"0\">");
-	writer.println("<tr>");
-	writer.println("<td>");
-	writer.println("<img src=\"images/tomcat.gif\">");
-	writer.println("</td>");
-	writer.println("<td>");
-	writer.println("<h1>Sample Application Servlet</h1>");
-	writer.println("This is the output of a servlet that is part of");
-	writer.println("the Hello, World application.");
-	writer.println("</td>");
-	writer.println("</tr>");
-	writer.println("</table>");
+        writer.println("<html>");
+        writer.println("<head>");
+        writer.println("<title>Sample Application Servlet Page</title>");
+        writer.println("</head>");
+        writer.println("<body bgcolor=white>");
+
+        writer.println("<table border=\"0\">");
+        writer.println("<tr>");
+        writer.println("<td>");
+        writer.println("<img src=\"images/tomcat.gif\">");
+        writer.println("</td>");
+        writer.println("<td>");
+        writer.println("<h1>Sample Application Servlet</h1>");
+        writer.println("This is the output of a servlet that is part of");
+        writer.println("the Hello, World application.");
+        writer.println("</td>");
+        writer.println("</tr>");
+        writer.println("</table>");
 
-	writer.println("</body>");
-	writer.println("</html>");
+        writer.println("</body>");
+        writer.println("</html>");
 
     }
 

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/CookieExample.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/CookieExample.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/CookieExample.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/CookieExample.java Sat Jul 24 12:23:44 2010
@@ -54,12 +54,12 @@ public class CookieExample extends HttpS
         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>");

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java Sat Jul 24 12:23:44 2010
@@ -46,22 +46,22 @@ public class HelloWorldExample extends H
         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>");
         out.println("<a href=\"../index.html\">");

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java Sat Jul 24 12:23:44 2010
@@ -54,12 +54,12 @@ public class RequestHeaderExample extend
         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>");

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java Sat Jul 24 12:23:44 2010
@@ -55,12 +55,12 @@ public class RequestInfoExample extends 
         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>");
@@ -88,21 +88,20 @@ public class RequestInfoExample extends 
         out.println("</td></tr><tr><td>");
         out.println(RB.getString("requestinfo.label.remoteaddr"));
 
- 	String cipherSuite=
- 	    (String)request.getAttribute("javax.servlet.request.cipher_suite");
+        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>");
+        }
     }
 
     @Override

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java Sat Jul 24 12:23:44 2010
@@ -56,12 +56,12 @@ public class RequestParamExample extends
 
         // 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>");

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java Sat Jul 24 12:23:44 2010
@@ -1,19 +1,19 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package cal;
 
 import java.util.Hashtable;
@@ -21,52 +21,39 @@ import javax.servlet.http.*;
 
 public class Entries {
 
-  private Hashtable<String, Entry> entries;
-  private static final String[] time = {"8am", "9am", "10am", "11am", "12pm", 
-					"1pm", "2pm", "3pm", "4pm", "5pm", "6pm",
-					"7pm", "8pm" };
-  public static final int rows = 12;
-
-  public Entries () {   
-   entries = new Hashtable<String, Entry> (rows);
-   for (int i=0; i < rows; i++) {
-     entries.put (time[i], new Entry(time[i]));
-   }
-  }
-
-  public int getRows () {
-    return rows;
-  }
-
-  public Entry getEntry (int index) {
-    return this.entries.get(time[index]);
-  }
-
-  public int getIndex (String tm) {
-    for (int i=0; i<rows; i++)
-      if(tm.equals(time[i])) return i;
-    return -1;
-  }
-
-  public void processRequest (HttpServletRequest request, String tm) {
-    int index = getIndex (tm);
-    if (index >= 0) {
-      String descr = request.getParameter ("description");
-      entries.get(time[index]).setDescription (descr);
+    private Hashtable<String, Entry> entries;
+    private static final String[] time = { "8am", "9am", "10am", "11am",
+            "12pm", "1pm", "2pm", "3pm", "4pm", "5pm", "6pm", "7pm", "8pm" };
+    public static final int rows = 12;
+
+    public Entries() {
+        entries = new Hashtable<String, Entry>(rows);
+        for (int i = 0; i < rows; i++) {
+            entries.put(time[i], new Entry(time[i]));
+        }
     }
-  }
-
-}
-
-
-
-
-
-
-
-
 
+    public int getRows() {
+        return rows;
+    }
 
+    public Entry getEntry(int index) {
+        return this.entries.get(time[index]);
+    }
 
+    public int getIndex(String tm) {
+        for (int i = 0; i < rows; i++)
+            if (tm.equals(time[i]))
+                return i;
+        return -1;
+    }
 
+    public void processRequest(HttpServletRequest request, String tm) {
+        int index = getIndex(tm);
+        if (index >= 0) {
+            String descr = request.getParameter("description");
+            entries.get(time[index]).setDescription(descr);
+        }
+    }
 
+}

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java Sat Jul 24 12:23:44 2010
@@ -23,127 +23,127 @@ public class JspCalendar {
     Calendar  calendar = null;
 
     public JspCalendar() {
-	calendar = Calendar.getInstance();
-	Date trialTime = new Date();
-	calendar.setTime(trialTime);
+        calendar = Calendar.getInstance();
+        Date trialTime = new Date();
+        calendar.setTime(trialTime);
     }
 
 
     public int getYear() {
-	return calendar.get(Calendar.YEAR);
+        return calendar.get(Calendar.YEAR);
     }
     
     public String getMonth() {
-	int m = getMonthInt();
-	String[] months = new String [] { "January", "February", "March",
-					"April", "May", "June",
-					"July", "August", "September",
-					"October", "November", "December" };
-	if (m > 12)
-	    return "Unknown to Man";
-	
-	return months[m - 1];
+        int m = getMonthInt();
+        String[] months = new String [] { "January", "February", "March",
+                                        "April", "May", "June",
+                                        "July", "August", "September",
+                                        "October", "November", "December" };
+        if (m > 12)
+            return "Unknown to Man";
+        
+        return months[m - 1];
 
     }
 
     public String getDay() {
-	int x = getDayOfWeek();
-	String[] days = new String[] {"Sunday", "Monday", "Tuesday", "Wednesday", 
-				      "Thursday", "Friday", "Saturday"};
+        int x = getDayOfWeek();
+        String[] days = new String[] {"Sunday", "Monday", "Tuesday", "Wednesday", 
+                                      "Thursday", "Friday", "Saturday"};
 
-	if (x > 7)
-	    return "Unknown to Man";
+        if (x > 7)
+            return "Unknown to Man";
 
-	return days[x - 1];
+        return days[x - 1];
 
     }
     
     public int getMonthInt() {
-	return 1 + calendar.get(Calendar.MONTH);
+        return 1 + calendar.get(Calendar.MONTH);
     }
 
     public String getDate() {
-	return getMonthInt() + "/" + getDayOfMonth() + "/" +  getYear();	
+        return getMonthInt() + "/" + getDayOfMonth() + "/" +  getYear();
     }
 
     public String getCurrentDate() {
         Date dt = new Date ();
-	calendar.setTime (dt);
-	return getMonthInt() + "/" + getDayOfMonth() + "/" +  getYear();
+        calendar.setTime (dt);
+        return getMonthInt() + "/" + getDayOfMonth() + "/" +  getYear();
 
     }
 
     public String getNextDate() {
         calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() + 1);
-	return getDate ();
+        return getDate ();
     }
 
     public String getPrevDate() {
         calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() - 1);
-	return getDate ();
+        return getDate ();
     }
 
     public String getTime() {
-	return getHour() + ":" + getMinute() + ":" + getSecond();
+        return getHour() + ":" + getMinute() + ":" + getSecond();
     }
 
     public int getDayOfMonth() {
-	return calendar.get(Calendar.DAY_OF_MONTH);
+        return calendar.get(Calendar.DAY_OF_MONTH);
     }
 
     public int getDayOfYear() {
-	return calendar.get(Calendar.DAY_OF_YEAR);
+        return calendar.get(Calendar.DAY_OF_YEAR);
     }
 
     public int getWeekOfYear() {
-	return calendar.get(Calendar.WEEK_OF_YEAR);
+        return calendar.get(Calendar.WEEK_OF_YEAR);
     }
 
     public int getWeekOfMonth() {
-	return calendar.get(Calendar.WEEK_OF_MONTH);
+        return calendar.get(Calendar.WEEK_OF_MONTH);
     }
 
     public int getDayOfWeek() {
-	return calendar.get(Calendar.DAY_OF_WEEK);
+        return calendar.get(Calendar.DAY_OF_WEEK);
     }
      
     public int getHour() {
-	return calendar.get(Calendar.HOUR_OF_DAY);
+        return calendar.get(Calendar.HOUR_OF_DAY);
     }
     
     public int getMinute() {
-	return calendar.get(Calendar.MINUTE);
+        return calendar.get(Calendar.MINUTE);
     }
 
 
     public int getSecond() {
-	return calendar.get(Calendar.SECOND);
+        return calendar.get(Calendar.SECOND);
     }
 
   
     public int getEra() {
-	return calendar.get(Calendar.ERA);
+        return calendar.get(Calendar.ERA);
     }
 
     public String getUSTimeZone() {
-	String[] zones = new String[] {"Hawaii", "Alaskan", "Pacific",
-				       "Mountain", "Central", "Eastern"};
-	
-	return zones[10 + getZoneOffset()];
+        String[] zones = new String[] {"Hawaii", "Alaskan", "Pacific",
+                                       "Mountain", "Central", "Eastern"};
+        
+        return zones[10 + getZoneOffset()];
     }
 
     public int getZoneOffset() {
-	return calendar.get(Calendar.ZONE_OFFSET)/(60*60*1000);
+        return calendar.get(Calendar.ZONE_OFFSET)/(60*60*1000);
     }
 
 
     public int getDSTOffset() {
-	return calendar.get(Calendar.DST_OFFSET)/(60*60*1000);
+        return calendar.get(Calendar.DST_OFFSET)/(60*60*1000);
     }
 
     
     public int getAMPM() {
-	return calendar.get(Calendar.AM_PM);
+        return calendar.get(Calendar.AM_PM);
     }
 }
 

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java Sat Jul 24 12:23:44 2010
@@ -1,19 +1,19 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package cal;
 
 import javax.servlet.http.*;
@@ -21,80 +21,80 @@ import java.util.Hashtable;
 
 public class TableBean {
 
-  Hashtable<String, Entries> table;
-  JspCalendar JspCal;
-  Entries entries;
-  String date;
-  String name = null;
-  String email = null;
-  boolean processError = false;
-
-  public TableBean () {
-    this.table = new Hashtable<String, Entries> (10);
-    this.JspCal = new JspCalendar ();
-    this.date = JspCal.getCurrentDate ();
-  }
-
-  public void setName (String nm) {
-    this.name = nm;
-  }
-
-  public String getName () {
-    return this.name;
-  }
-  
-  public void setEmail (String mail) {
-    this.email = mail;
-  }
-
-  public String getEmail () {
-    return this.email;
-  }
-
-  public String getDate () {
-    return this.date;
-  }
-
-  public Entries getEntries () {
-    return this.entries;
-  }
-
-  public void processRequest (HttpServletRequest request) {
-
-    // Get the name and e-mail.
-    this.processError = false;
-    if (name == null || name.equals("")) setName(request.getParameter ("name"));  
-    if (email == null || email.equals("")) setEmail(request.getParameter ("email"));
-    if (name == null || email == null ||
-		name.equals("") || email.equals("")) {
-      this.processError = true;
-      return;
-    }
-
-    // Get the date.
-    String dateR = request.getParameter ("date");
-    if (dateR == null) date = JspCal.getCurrentDate ();
-    else if (dateR.equalsIgnoreCase("next")) date = JspCal.getNextDate ();
-    else if (dateR.equalsIgnoreCase("prev")) date = JspCal.getPrevDate ();
-
-    entries = table.get (date);
-    if (entries == null) {
-      entries = new Entries ();
-      table.put (date, entries);
-    }
-
-    // If time is provided add the event.
-	String time = request.getParameter("time");
-    if (time != null) entries.processRequest (request, time);
-  }
-
-  public boolean getProcessError () {
-    return this.processError;
-  }
-}
+    Hashtable<String, Entries> table;
+    JspCalendar JspCal;
+    Entries entries;
+    String date;
+    String name = null;
+    String email = null;
+    boolean processError = false;
+
+    public TableBean() {
+        this.table = new Hashtable<String, Entries>(10);
+        this.JspCal = new JspCalendar();
+        this.date = JspCal.getCurrentDate();
+    }
+
+    public void setName(String nm) {
+        this.name = nm;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public void setEmail(String mail) {
+        this.email = mail;
+    }
 
+    public String getEmail() {
+        return this.email;
+    }
 
+    public String getDate() {
+        return this.date;
+    }
 
+    public Entries getEntries() {
+        return this.entries;
+    }
 
+    public void processRequest(HttpServletRequest request) {
 
+        // Get the name and e-mail.
+        this.processError = false;
+        if (name == null || name.equals(""))
+            setName(request.getParameter("name"));
+        if (email == null || email.equals(""))
+            setEmail(request.getParameter("email"));
+        if (name == null || email == null || name.equals("")
+                || email.equals("")) {
+            this.processError = true;
+            return;
+        }
+
+        // Get the date.
+        String dateR = request.getParameter("date");
+        if (dateR == null)
+            date = JspCal.getCurrentDate();
+        else if (dateR.equalsIgnoreCase("next"))
+            date = JspCal.getNextDate();
+        else if (dateR.equalsIgnoreCase("prev"))
+            date = JspCal.getPrevDate();
+
+        entries = table.get(date);
+        if (entries == null) {
+            entries = new Entries();
+            table.put(date, entries);
+        }
+
+        // If time is provided add the event.
+        String time = request.getParameter("time");
+        if (time != null)
+            entries.processRequest(request, time);
+    }
 
+    public boolean getProcessError() {
+        return this.processError;
+    }
+}

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java Sat Jul 24 12:23:44 2010
@@ -22,10 +22,10 @@ public class CheckTest {
     String b[] = new String[] { "1", "2", "3", "4" };
 
     public String[] getFruit() {
-	return b;
+        return b;
     }
 
     public void setFruit(String [] b) {
-	this.b = b;
+        this.b = b;
     }
 }

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java Sat Jul 24 12:23:44 2010
@@ -22,131 +22,131 @@ public class JspCalendar {
     Calendar  calendar = null;
 
     public JspCalendar() {
-	calendar = Calendar.getInstance();
-	Date trialTime = new Date();
-	calendar.setTime(trialTime);
+        calendar = Calendar.getInstance();
+        Date trialTime = new Date();
+        calendar.setTime(trialTime);
     }
 
     public int getYear() {
-	return calendar.get(Calendar.YEAR);
+        return calendar.get(Calendar.YEAR);
     }
     
     public String getMonth() {
-	int m = getMonthInt();
-	String[] months = new String [] { "January", "February", "March",
-					"April", "May", "June",
-					"July", "August", "September",
-					"October", "November", "December" };
-	if (m > 12)
-	    return "Unknown to Man";
-	
-	return months[m - 1];
+        int m = getMonthInt();
+        String[] months = new String [] { "January", "February", "March",
+                                        "April", "May", "June",
+                                        "July", "August", "September",
+                                        "October", "November", "December" };
+        if (m > 12)
+            return "Unknown to Man";
+        
+        return months[m - 1];
 
     }
 
     public String getDay() {
-	int x = getDayOfWeek();
-	String[] days = new String[] {"Sunday", "Monday", "Tuesday", "Wednesday", 
-				      "Thursday", "Friday", "Saturday"};
+        int x = getDayOfWeek();
+        String[] days = new String[] {"Sunday", "Monday", "Tuesday", "Wednesday", 
+                                      "Thursday", "Friday", "Saturday"};
 
-	if (x > 7)
-	    return "Unknown to Man";
+        if (x > 7)
+            return "Unknown to Man";
 
-	return days[x - 1];
+        return days[x - 1];
 
     }
     
     public int getMonthInt() {
-	return 1 + calendar.get(Calendar.MONTH);
+        return 1 + calendar.get(Calendar.MONTH);
     }
 
     public String getDate() {
-	return getMonthInt() + "/" + getDayOfMonth() + "/" +  getYear();
+        return getMonthInt() + "/" + getDayOfMonth() + "/" +  getYear();
 
     }
 
     public String getTime() {
-	return getHour() + ":" + getMinute() + ":" + getSecond();
+        return getHour() + ":" + getMinute() + ":" + getSecond();
     }
 
     public int getDayOfMonth() {
-	return calendar.get(Calendar.DAY_OF_MONTH);
+        return calendar.get(Calendar.DAY_OF_MONTH);
     }
 
     public int getDayOfYear() {
-	return calendar.get(Calendar.DAY_OF_YEAR);
+        return calendar.get(Calendar.DAY_OF_YEAR);
     }
 
     public int getWeekOfYear() {
-	return calendar.get(Calendar.WEEK_OF_YEAR);
+        return calendar.get(Calendar.WEEK_OF_YEAR);
     }
 
     public int getWeekOfMonth() {
-	return calendar.get(Calendar.WEEK_OF_MONTH);
+        return calendar.get(Calendar.WEEK_OF_MONTH);
     }
 
     public int getDayOfWeek() {
-	return calendar.get(Calendar.DAY_OF_WEEK);
+        return calendar.get(Calendar.DAY_OF_WEEK);
     }
      
     public int getHour() {
-	return calendar.get(Calendar.HOUR_OF_DAY);
+        return calendar.get(Calendar.HOUR_OF_DAY);
     }
     
     public int getMinute() {
-	return calendar.get(Calendar.MINUTE);
+        return calendar.get(Calendar.MINUTE);
     }
 
 
     public int getSecond() {
-	return calendar.get(Calendar.SECOND);
+        return calendar.get(Calendar.SECOND);
     }
 
     public static void main(String args[]) {
-	JspCalendar db = new JspCalendar();
-	p("date: " + db.getDayOfMonth());
-	p("year: " + db.getYear());
-	p("month: " + db.getMonth());
-	p("time: " + db.getTime());
-	p("date: " + db.getDate());
-	p("Day: " + db.getDay());
-	p("DayOfYear: " + db.getDayOfYear());
-	p("WeekOfYear: " + db.getWeekOfYear());
-	p("era: " + db.getEra());
-	p("ampm: " + db.getAMPM());
-	p("DST: " + db.getDSTOffset());
-	p("ZONE Offset: " + db.getZoneOffset());
-	p("TIMEZONE: " + db.getUSTimeZone());
+        JspCalendar db = new JspCalendar();
+        p("date: " + db.getDayOfMonth());
+        p("year: " + db.getYear());
+        p("month: " + db.getMonth());
+        p("time: " + db.getTime());
+        p("date: " + db.getDate());
+        p("Day: " + db.getDay());
+        p("DayOfYear: " + db.getDayOfYear());
+        p("WeekOfYear: " + db.getWeekOfYear());
+        p("era: " + db.getEra());
+        p("ampm: " + db.getAMPM());
+        p("DST: " + db.getDSTOffset());
+        p("ZONE Offset: " + db.getZoneOffset());
+        p("TIMEZONE: " + db.getUSTimeZone());
     }
 
     private static void p(String x) {
-	System.out.println(x);
+        System.out.println(x);
     }
 
 
     public int getEra() {
-	return calendar.get(Calendar.ERA);
+        return calendar.get(Calendar.ERA);
     }
 
     public String getUSTimeZone() {
-	String[] zones = new String[] {"Hawaii", "Alaskan", "Pacific",
-				       "Mountain", "Central", "Eastern"};
-	
-	return zones[10 + getZoneOffset()];
+        String[] zones = new String[] {"Hawaii", "Alaskan", "Pacific",
+                                       "Mountain", "Central", "Eastern"};
+        
+        return zones[10 + getZoneOffset()];
     }
 
     public int getZoneOffset() {
-	return calendar.get(Calendar.ZONE_OFFSET)/(60*60*1000);
+        return calendar.get(Calendar.ZONE_OFFSET)/(60*60*1000);
     }
 
 
     public int getDSTOffset() {
-	return calendar.get(Calendar.DST_OFFSET)/(60*60*1000);
+        return calendar.get(Calendar.DST_OFFSET)/(60*60*1000);
     }
 
     
     public int getAMPM() {
-	return calendar.get(Calendar.AM_PM);
+        return calendar.get(Calendar.AM_PM);
     }
 }
 

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/error/Smart.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/error/Smart.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/error/Smart.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/error/Smart.java Sat Jul 24 12:23:44 2010
@@ -1,32 +1,30 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package error;
 
 public class Smart {
 
-  String name = "JSP";
-
-  public String getName () {
-	return name;
-  }	
+    String name = "JSP";
 
-  public void setName (String name) {
-	this.name = name;
-  }	
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
 }

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java Sat Jul 24 12:23:44 2010
@@ -57,7 +57,7 @@ public class FooTag extends ExampleTagBa
     @Override
     public int doStartTag() throws JspException {
         i = 0;
-	return EVAL_BODY_BUFFERED;
+        return EVAL_BODY_BUFFERED;
     }
 
     @Override

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/examples/ShowSource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/examples/ShowSource.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/examples/ShowSource.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/examples/ShowSource.java Sat Jul 24 12:23:44 2010
@@ -38,10 +38,10 @@ public class ShowSource extends TagSuppo
 
     @Override
     public int doEndTag() throws JspException {
-	if ((jspFile.indexOf( ".." ) >= 0) ||
+        if ((jspFile.indexOf( ".." ) >= 0) ||
             (jspFile.toUpperCase(Locale.ENGLISH).indexOf("/WEB-INF/") != 0) ||
             (jspFile.toUpperCase(Locale.ENGLISH).indexOf("/META-INF/") != 0))
-	    throw new JspTagException("Invalid JSP file " + jspFile);
+            throw new JspTagException("Invalid JSP file " + jspFile);
 
         InputStream in
             = pageContext.getServletContext().getResourceAsStream(jspFile);

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/el/Functions.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/el/Functions.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/el/Functions.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/el/Functions.java Sat Jul 24 12:23:44 2010
@@ -30,13 +30,13 @@ public class Functions {
 
     public static int numVowels( String text ) {
         String vowels = "aeiouAEIOU";
-	int result = 0;
+        int result = 0;
         for( int i = 0; i < text.length(); i++ ) {
-	    if( vowels.indexOf( text.charAt( i ) ) != -1 ) {
-	        result++;
-	    }
-	}
-	return result;
+            if( vowels.indexOf( text.charAt( i ) ) != -1 ) {
+                result++;
+            }
+        }
+        return result;
     }
 
     public static String caps( String text ) {

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java Sat Jul 24 12:23:44 2010
@@ -37,19 +37,19 @@ public class EchoAttributesTag 
 
     @Override
     public void doTag() throws JspException, IOException {
-	JspWriter out = getJspContext().getOut();
-	for( int i = 0; i < keys.size(); i++ ) {
-	    String key = keys.get( i );
-	    Object value = values.get( i );
-	    out.println( "<li>" + key + " = " + value + "</li>" );
+        JspWriter out = getJspContext().getOut();
+        for( int i = 0; i < keys.size(); i++ ) {
+            String key = keys.get( i );
+            Object value = values.get( i );
+            out.println( "<li>" + key + " = " + value + "</li>" );
         }
     }
 
     public void setDynamicAttribute( String uri, String localName, 
-	Object value ) 
-	throws JspException
+        Object value ) 
+        throws JspException
     {
-	keys.add( localName );
-	values.add( value );
+        keys.add( localName );
+        values.add( value );
     }
 }

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/FindBookSimpleTag.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/FindBookSimpleTag.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/FindBookSimpleTag.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/FindBookSimpleTag.java Sat Jul 24 12:23:44 2010
@@ -40,6 +40,6 @@ public class FindBookSimpleTag extends S
     }
 
     public void setVar( String var ) {
-	this.var = var;
+        this.var = var;
     }
 }

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/HelloWorldSimpleTag.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/HelloWorldSimpleTag.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/HelloWorldSimpleTag.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/HelloWorldSimpleTag.java Sat Jul 24 12:23:44 2010
@@ -28,6 +28,6 @@ import java.io.IOException;
 public class HelloWorldSimpleTag extends SimpleTagSupport {
     @Override
     public void doTag() throws JspException, IOException {
-	getJspContext().getOut().write( "Hello, world!" );
+        getJspContext().getOut().write( "Hello, world!" );
     }
 }

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java Sat Jul 24 12:23:44 2010
@@ -33,11 +33,11 @@ public class RepeatSimpleTag extends Sim
     public void doTag() throws JspException, IOException {
         for (int i=0; i<num; i++) {
             getJspContext().setAttribute("count", String.valueOf( i + 1 ) );
-	    getJspBody().invoke(null);
+            getJspBody().invoke(null);
         }
     }
 
     public void setNum(int num) {
-	this.num = num;
+        this.num = num;
     }
 }

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/TileSimpleTag.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/TileSimpleTag.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/TileSimpleTag.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/TileSimpleTag.java Sat Jul 24 12:23:44 2010
@@ -31,9 +31,9 @@ public class TileSimpleTag extends Simpl
 
     @Override
     public void doTag() throws JspException, IOException {
-	getJspContext().getOut().write( 
-	    "<td width=\"32\" height=\"32\" bgcolor=\"" + this.color + 
-	    "\"><font color=\"#ffffff\"><center>" + this.label + 
+        getJspContext().getOut().write( 
+                "<td width=\"32\" height=\"32\" bgcolor=\"" + this.color + 
+                "\"><font color=\"#ffffff\"><center>" + this.label + 
                 "</center></font></td>" );
     }
 

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/ContextListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/ContextListener.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/ContextListener.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/ContextListener.java Sat Jul 24 12:23:44 2010
@@ -14,7 +14,6 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-
 package listeners;
 
 
@@ -58,8 +57,8 @@ public final class ContextListener
      */
     public void attributeAdded(ServletContextAttributeEvent event) {
 
-	log("attributeAdded('" + event.getName() + "', '" +
-	    event.getValue() + "')");
+        log("attributeAdded('" + event.getName() + "', '" +
+                event.getValue() + "')");
 
     }
 
@@ -71,8 +70,8 @@ public final class ContextListener
      */
     public void attributeRemoved(ServletContextAttributeEvent event) {
 
-	log("attributeRemoved('" + event.getName() + "', '" +
-	    event.getValue() + "')");
+        log("attributeRemoved('" + event.getName() + "', '" +
+                event.getValue() + "')");
 
     }
 
@@ -84,8 +83,8 @@ public final class ContextListener
      */
     public void attributeReplaced(ServletContextAttributeEvent event) {
 
-	log("attributeReplaced('" + event.getName() + "', '" +
-	    event.getValue() + "')");
+        log("attributeReplaced('" + event.getName() + "', '" +
+                event.getValue() + "')");
 
     }
 
@@ -97,8 +96,8 @@ public final class ContextListener
      */
     public void contextDestroyed(ServletContextEvent event) {
 
-	log("contextDestroyed()");
-	this.context = null;
+        log("contextDestroyed()");
+        this.context = null;
 
     }
 
@@ -110,8 +109,8 @@ public final class ContextListener
      */
     public void contextInitialized(ServletContextEvent event) {
 
-	this.context = event.getServletContext();
-	log("contextInitialized()");
+        this.context = event.getServletContext();
+        log("contextInitialized()");
 
     }
 
@@ -126,10 +125,10 @@ public final class ContextListener
      */
     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);
 
     }
 

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/SessionListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/SessionListener.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/SessionListener.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/listeners/SessionListener.java Sat Jul 24 12:23:44 2010
@@ -1,23 +1,21 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package listeners;
 
-
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
@@ -26,137 +24,131 @@ import javax.servlet.http.HttpSessionBin
 import javax.servlet.http.HttpSessionEvent;
 import javax.servlet.http.HttpSessionListener;
 
-
 /**
  * Example listener for context-related application events, which were
- * introduced in the 2.3 version of the Servlet API.  This listener
- * merely documents the occurrence of such events in the application log
- * associated with our servlet context.
- *
+ * introduced in the 2.3 version of the Servlet API. This listener merely
+ * documents the occurrence of such events in the application log associated
+ * with our servlet context.
+ * 
  * @author Craig R. McClanahan
  * @version $Id$
  */
 
-public final class SessionListener
-    implements ServletContextListener,
-	       HttpSessionAttributeListener, HttpSessionListener {
-
+public final class SessionListener implements ServletContextListener,
+        HttpSessionAttributeListener, HttpSessionListener {
 
     // ----------------------------------------------------- Instance Variables
 
-
     /**
      * The servlet context with which we are associated.
      */
     private ServletContext context = null;
 
-
     // --------------------------------------------------------- Public Methods
 
-
     /**
      * Record the fact that a servlet context attribute was added.
-     *
-     * @param event The session attribute event
+     * 
+     * @param event
+     *            The session attribute event
      */
     public void attributeAdded(HttpSessionBindingEvent event) {
 
-	log("attributeAdded('" + event.getSession().getId() + "', '" +
-	    event.getName() + "', '" + event.getValue() + "')");
+        log("attributeAdded('" + event.getSession().getId() + "', '"
+                + event.getName() + "', '" + event.getValue() + "')");
 
     }
 
-
     /**
      * Record the fact that a servlet context attribute was removed.
-     *
-     * @param event The session attribute event
+     * 
+     * @param event
+     *            The session attribute event
      */
     public void attributeRemoved(HttpSessionBindingEvent event) {
 
-	log("attributeRemoved('" + event.getSession().getId() + "', '" +
-	    event.getName() + "', '" + event.getValue() + "')");
+        log("attributeRemoved('" + event.getSession().getId() + "', '"
+                + event.getName() + "', '" + event.getValue() + "')");
 
     }
 
-
     /**
      * Record the fact that a servlet context attribute was replaced.
-     *
-     * @param event The session attribute event
+     * 
+     * @param event
+     *            The session attribute event
      */
     public void attributeReplaced(HttpSessionBindingEvent event) {
 
-	log("attributeReplaced('" + event.getSession().getId() + "', '" +
-	    event.getName() + "', '" + event.getValue() + "')");
+        log("attributeReplaced('" + event.getSession().getId() + "', '"
+                + event.getName() + "', '" + event.getValue() + "')");
 
     }
 
-
     /**
      * Record the fact that this web application has been destroyed.
-     *
-     * @param event The servlet context event
+     * 
+     * @param event
+     *            The servlet context event
      */
     public void contextDestroyed(ServletContextEvent event) {
 
-	log("contextDestroyed()");
-	this.context = null;
+        log("contextDestroyed()");
+        this.context = null;
 
     }
 
-
     /**
      * Record the fact that this web application has been initialized.
-     *
-     * @param event The servlet context event
+     * 
+     * @param event
+     *            The servlet context event
      */
     public void contextInitialized(ServletContextEvent event) {
 
-	this.context = event.getServletContext();
-	log("contextInitialized()");
+        this.context = event.getServletContext();
+        log("contextInitialized()");
 
     }
 
-
     /**
      * Record the fact that a session has been created.
-     *
-     * @param event The session event
+     * 
+     * @param event
+     *            The session event
      */
     public void sessionCreated(HttpSessionEvent event) {
 
-	log("sessionCreated('" + event.getSession().getId() + "')");
+        log("sessionCreated('" + event.getSession().getId() + "')");
 
     }
 
-
     /**
      * Record the fact that a session has been destroyed.
-     *
-     * @param event The session event
+     * 
+     * @param event
+     *            The session event
      */
     public void sessionDestroyed(HttpSessionEvent event) {
 
-	log("sessionDestroyed('" + event.getSession().getId() + "')");
+        log("sessionDestroyed('" + event.getSession().getId() + "')");
 
     }
 
-
     // -------------------------------------------------------- Private Methods
 
-
     /**
      * Log a message to the servlet context application log.
-     *
-     * @param message Message to be logged
+     * 
+     * @param message
+     *            Message to be logged
      */
     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);
 
     }
 

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/servletToJsp.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/servletToJsp.java?rev=978861&r1=978860&r2=978861&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/servletToJsp.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/servletToJsp.java Sat Jul 24 12:23:44 2010
@@ -22,14 +22,15 @@ public class servletToJsp extends HttpSe
 
     @Override
     public void doGet (HttpServletRequest request,
-		       HttpServletResponse response) {
+            HttpServletResponse response) {
 
-	try {
-	    // Set the attribute and Forward to hello.jsp
-	    request.setAttribute ("servletName", "servletToJsp");
-	    getServletConfig().getServletContext().getRequestDispatcher("/jsp/jsptoserv/hello.jsp").forward(request, response);
-	} catch (Exception ex) {
-	    ex.printStackTrace ();
-	}
+       try {
+           // Set the attribute and Forward to hello.jsp
+           request.setAttribute ("servletName", "servletToJsp");
+           getServletConfig().getServletContext().getRequestDispatcher(
+                   "/jsp/jsptoserv/hello.jsp").forward(request, response);
+       } catch (Exception ex) {
+           ex.printStackTrace ();
+       }
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org