升级Tomcat版本 apache-tomcat-7.0.77
diff --git a/tomcat-uidm/webapps/examples/jsp/plugin/applet/Clock2.class b/tomcat-uidm/webapps/examples/jsp/plugin/applet/Clock2.class
index 32fa663..cc968cd 100644
--- a/tomcat-uidm/webapps/examples/jsp/plugin/applet/Clock2.class
+++ b/tomcat-uidm/webapps/examples/jsp/plugin/applet/Clock2.class
Binary files differ
diff --git a/tomcat-uidm/webapps/examples/jsp/plugin/applet/Clock2.java b/tomcat-uidm/webapps/examples/jsp/plugin/applet/Clock2.java
index f228b82..ccc96d1 100644
--- a/tomcat-uidm/webapps/examples/jsp/plugin/applet/Clock2.java
+++ b/tomcat-uidm/webapps/examples/jsp/plugin/applet/Clock2.java
@@ -15,10 +15,13 @@
 * limitations under the License.

 */

 

-import java.util.*;

-import java.awt.*;

-import java.applet.*;

-import java.text.*;

+import java.applet.Applet;

+import java.awt.Color;

+import java.awt.Font;

+import java.awt.Graphics;

+import java.text.SimpleDateFormat;

+import java.util.Date;

+import java.util.Locale;

 

 /**

  * Time!

@@ -27,9 +30,10 @@
  */

 

 public class Clock2 extends Applet implements Runnable {

+    private static final long serialVersionUID = 1L;

     Thread timer;                // The thread that displays clock

     int lastxs, lastys, lastxm,

-        lastym, lastxh, lastyh;  // Dimensions used to draw hands 

+        lastym, lastxh, lastyh;  // Dimensions used to draw hands

     SimpleDateFormat formatter;  // Formats the date displayed

     String lastdate;             // String to hold date displayed

     Font clockFaceFont;          // Font for number display on clock

@@ -37,8 +41,8 @@
     Color handColor;             // Color of main hands and dial

     Color numberColor;           // Color of second hand and numbers

 

+    @Override

     public void init() {

-        int x,y;

         lastxs = lastys = lastxm = lastym = lastxh = lastyh = 0;

         formatter = new SimpleDateFormat ("EEE MMM dd hh:mm:ss yyyy", Locale.getDefault());

         currentDate = new Date();

@@ -96,6 +100,7 @@
     }

 

     // Paint is the main part of the program

+    @Override

     public void paint(Graphics g) {

         int xh, yh, xm, ym, xs, ys, s = 0, m = 10, h = 10, xcenter, ycenter;

         String today;

@@ -112,7 +117,7 @@
             m = Integer.parseInt(formatter.format(currentDate));

         } catch (NumberFormatException n) {

             m = 10;

-        }    

+        }

         formatter.applyPattern("h");

         try {

             h = Integer.parseInt(formatter.format(currentDate));

@@ -123,30 +128,30 @@
         today = formatter.format(currentDate);

         xcenter=80;

         ycenter=55;

-    

+

     // a= s* pi/2 - pi/2 (to switch 0,0 from 3:00 to 12:00)

     // x = r(cos a) + xcenter, y = r(sin a) + ycenter

-    

+

         xs = (int)(Math.cos(s * 3.14f/30 - 3.14f/2) * 45 + xcenter);

         ys = (int)(Math.sin(s * 3.14f/30 - 3.14f/2) * 45 + ycenter);

         xm = (int)(Math.cos(m * 3.14f/30 - 3.14f/2) * 40 + xcenter);

         ym = (int)(Math.sin(m * 3.14f/30 - 3.14f/2) * 40 + ycenter);

         xh = (int)(Math.cos((h*30 + m/2) * 3.14f/180 - 3.14f/2) * 30 + xcenter);

         yh = (int)(Math.sin((h*30 + m/2) * 3.14f/180 - 3.14f/2) * 30 + ycenter);

-    

+

     // Draw the circle and numbers

-    

+

         g.setFont(clockFaceFont);

         g.setColor(handColor);

         circle(xcenter,ycenter,50,g);

         g.setColor(numberColor);

-        g.drawString("9",xcenter-45,ycenter+3); 

+        g.drawString("9",xcenter-45,ycenter+3);

         g.drawString("3",xcenter+40,ycenter+3);

         g.drawString("12",xcenter-5,ycenter-37);

         g.drawString("6",xcenter-3,ycenter+45);

 

     // Erase if necessary, and redraw

-    

+

         g.setColor(getBackground());

         if (xs != lastxs || ys != lastys) {

             g.drawLine(xcenter, ycenter, lastxs, lastys);

@@ -160,7 +165,7 @@
             g.drawLine(xcenter-1, ycenter, lastxh, lastyh); }

         g.setColor(numberColor);

         g.drawString("", 5, 125);

-        g.drawString(today, 5, 125);    

+        g.drawString(today, 5, 125);

         g.drawLine(xcenter, ycenter, xs, ys);

         g.setColor(handColor);

         g.drawLine(xcenter, ycenter-1, xm, ym);

@@ -174,34 +179,40 @@
         currentDate=null;

     }

 

+    @Override

     public void start() {

         timer = new Thread(this);

         timer.start();

     }

 

+    @Override

     public void stop() {

         timer = null;

     }

 

+    @Override

     public void run() {

         Thread me = Thread.currentThread();

         while (timer == me) {

             try {

-                Thread.currentThread().sleep(100);

+                Thread.sleep(100);

             } catch (InterruptedException e) {

             }

             repaint();

         }

     }

 

+    @Override

     public void update(Graphics g) {

         paint(g);

     }

 

+    @Override

     public String getAppletInfo() {

         return "Title: A Clock \nAuthor: Rachel Gollub, 1995 \nAn analog clock.";

     }

-  

+

+    @Override

     public String[][] getParameterInfo() {

         String[][] info = {

             {"bgcolor", "hexadecimal RGB number", "The background color. Default is the color of your browser."},

diff --git a/tomcat-uidm/webapps/examples/jsp/plugin/plugin.jsp b/tomcat-uidm/webapps/examples/jsp/plugin/plugin.jsp
index 12db7d4..3347f6e 100644
--- a/tomcat-uidm/webapps/examples/jsp/plugin/plugin.jsp
+++ b/tomcat-uidm/webapps/examples/jsp/plugin/plugin.jsp
@@ -1,5 +1,4 @@
-<html>

-<!--

+<%--

  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.

@@ -14,7 +13,8 @@
   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.

--->

+--%>

+<html>

 <title> Plugin example </title>

 <body bgcolor="white">

 <h3> Current time is : </h3>

@@ -25,7 +25,7 @@
 </jsp:plugin>

 <p>

 <h4>

-<font color=red> 

+<font color=red>

 The above applet is loaded using the Java Plugin from a jsp page using the

 plugin tag.

 </font>

diff --git a/tomcat-uidm/webapps/examples/jsp/plugin/plugin.jsp.html b/tomcat-uidm/webapps/examples/jsp/plugin/plugin.jsp.html
index b350d5e..121b375 100644
--- a/tomcat-uidm/webapps/examples/jsp/plugin/plugin.jsp.html
+++ b/tomcat-uidm/webapps/examples/jsp/plugin/plugin.jsp.html
@@ -1,6 +1,5 @@
 <html><body><pre>

-&lt;html>

-&lt;!--

+&lt;%--

  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.

@@ -15,7 +14,8 @@
   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.

--->

+--%>

+&lt;html>

 &lt;title> Plugin example &lt;/title>

 &lt;body bgcolor="white">

 &lt;h3> Current time is : &lt;/h3>

@@ -26,7 +26,7 @@
 &lt;/jsp:plugin>

 &lt;p>

 &lt;h4>

-&lt;font color=red> 

+&lt;font color=red>

 The above applet is loaded using the Java Plugin from a jsp page using the

 plugin tag.

 &lt;/font>