資源簡介
Tomcat是Apache 軟件基金會(Apache Software Foundation)的Jakarta 項目中的一個核心項目,由Apache、Sun 和其他一些公司及個人共同開發而成。由于有了Sun 的參與和支持,最新的Servlet 和JSP 規范總是能在Tomcat 中得到體現,Tomcat 5 支持最新的Servlet 2.4 和JSP 2.0 規范。因為Tomcat 技術先進、性能穩定,而且免費,因而深受Java 愛好者的喜愛并得到了部分軟件開發商的認可,成為目前比較流行的Web 應用服務器。目前最新版本是6.0。
代碼片段和文件信息
/*
*?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.
*/
import?java.util.*;
import?java.awt.*;
import?java.applet.*;
import?java.text.*;
/**
?*?Time!
?*
?*?@author?Rachel?Gollub
?*/
public?class?Clock2?extends?applet?implements?Runnable?{
????Thread?timer;????????????????//?The?thread?that?displays?clock
????int?lastxs?lastys?lastxm
????????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
????Date?currentDate;????????????//?Used?to?get?date?to?display
????Color?handColor;?????????????//?Color?of?main?hands?and?dial
????Color?numberColor;???????????//?Color?of?second?hand?and?numbers
????public?void?init()?{
????????int?xy;
????????lastxs?=?lastys?=?lastxm?=?lastym?=?lastxh?=?lastyh?=?0;
????????formatter?=?new?SimpleDateFormat?(“EEE?MMM?dd?hh:mm:ss?yyyy“?Locale.getDefault());
????????currentDate?=?new?Date();
????????lastdate?=?formatter.format(currentDate);
????????clockFaceFont?=?new?Font(“Serif“?Font.PLAIN?14);
????????handColor?=?Color.blue;
????????numberColor?=?Color.darkGray;
????????try?{
????????????setBackground(new?Color(Integer.parseInt(getParameter(“bgcolor“)16)));
????????}?catch?(Exception?E)?{?}
????????try?{
????????????handColor?=?new?Color(Integer.parseInt(getParameter(“fgcolor1“)16));
????????}?catch?(Exception?E)?{?}
????????try?{
????????????numberColor?=?new?Color(Integer.parseInt(getParameter(“fgcolor2“)16));
????????}?catch?(Exception?E)?{?}
????????resize(300300);??????????????//?Set?clock?window?size
????}
????//?Plotpoints?allows?calculation?to?only?cover?45?degrees?of?the?circle
????//?and?then?mirror
????public?void?plotpoints(int?x0?int?y0?int?x?int?y?Graphics?g)?{
????????g.drawLine(x0+xy0+yx0+xy0+y);
????????g.drawLine(x0+yy0+xx0+yy0+x);
????????g.drawLine(x0+yy0-xx0+yy0-x);
????????g.drawLine(x0+xy0-yx0+xy0-y);
????????g.drawLine(x0-xy0-yx0-xy0-y);
????????g.drawLine(x0-yy0-xx0-yy0-x);
????????g.drawLine(x0-yy0+xx0-yy0+x);
????????g.drawLine(x0-xy0+yx0-xy0+y);
????}
????//?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????23669??2007-03-05?08:26??apache-tomcat-5.5.23\bin\bootstrap.jar
?????文件????????968??2007-03-05?08:26??apache-tomcat-5.5.23\bin\catalina-tasks.xm
?????文件???????8962??2007-03-05?08:26??apache-tomcat-5.5.23\bin\catalina.bat
?????文件??????12044??2007-03-05?08:26??apache-tomcat-5.5.23\bin\catalina.sh
?????文件???????9341??2007-03-05?08:26??apache-tomcat-5.5.23\bin\commons-daemon.jar
?????文件??????26202??2007-03-05?08:26??apache-tomcat-5.5.23\bin\commons-logging-api.jar
?????文件????????509??2007-03-05?08:26??apache-tomcat-5.5.23\bin\cpappend.bat
?????文件???????1282??2007-03-05?08:26??apache-tomcat-5.5.23\bin\digest.bat
?????文件????????841??2007-03-05?08:26??apache-tomcat-5.5.23\bin\digest.sh
?????文件????????899??2007-03-05?08:26??apache-tomcat-5.5.23\bin\jkstatus-tasks.xm
?????文件???????1323??2007-03-05?08:26??apache-tomcat-5.5.23\bin\jmxaccessor-tasks.xm
?????文件??????74398??2007-03-05?08:26??apache-tomcat-5.5.23\bin\jsvc.tar.gz
?????文件????????449??2009-04-22?17:02??apache-tomcat-5.5.23\bin\response.xm
?????文件???????4122??2007-03-05?08:26??apache-tomcat-5.5.23\bin\service.bat
?????文件???????2413??2007-03-05?08:26??apache-tomcat-5.5.23\bin\setclasspath.bat
?????文件???????3008??2007-03-05?08:26??apache-tomcat-5.5.23\bin\setclasspath.sh
?????文件???????1271??2007-03-05?08:26??apache-tomcat-5.5.23\bin\shutdown.bat
?????文件????????780??2007-03-05?08:26??apache-tomcat-5.5.23\bin\shutdown.sh
?????文件???????1272??2007-03-05?08:26??apache-tomcat-5.5.23\bin\startup.bat
?????文件???????1173??2007-03-05?08:26??apache-tomcat-5.5.23\bin\startup.sh
?????文件??????12972??2007-03-05?08:26??apache-tomcat-5.5.23\bin\tomcat-juli.jar
?????文件?????173510??2007-03-05?08:26??apache-tomcat-5.5.23\bin\tomcat-native.tar.gz
?????文件??????53248??2007-03-05?08:26??apache-tomcat-5.5.23\bin\tomcat5.exe
?????文件??????98304??2007-03-05?08:26??apache-tomcat-5.5.23\bin\tomcat5w.exe
?????文件???????2233??2007-03-05?08:26??apache-tomcat-5.5.23\bin\tool-wrapper.bat
?????文件???????2545??2007-03-05?08:26??apache-tomcat-5.5.23\bin\tool-wrapper.sh
?????文件???????1278??2007-03-05?08:26??apache-tomcat-5.5.23\bin\version.bat
?????文件????????784??2007-03-05?08:26??apache-tomcat-5.5.23\bin\version.sh
?????目錄??????????0??2009-04-22?16:59??apache-tomcat-5.5.23\bin
?????目錄??????????0??2007-03-05?08:26??apache-tomcat-5.5.23\common\classes
............此處省略1257個文件信息
評論
共有 條評論