tomcat×Ô¶¯¼ÓÔØÐ޸ĺóµÄjavaÀà
ʹÓõ÷ÊÔģʽ¼´¿É¡£
½øTOMCATµÄmanager¿ØÖÆÌ¨£¬¿ÉÒÔ¶ÔÖ¸¶¨µÄÐéÄâĿ¼½øÐпØÖÆ£¨¼ÓÔØ£¬ÖØÔØ£¬Ð¶ÔØ£©£¬±ÈÖØÆô¿ìµÄ¶à£¬ÔÚTOMCATµÄĬÈÏÊ×Ò³ÉÏÓÐÁ´½Ó¡£
============================================================================================
ÎÒÃÇÔÚ¿ª·¢µÄ¹ý³Ì¾³£ÐèÒªµ÷ÊÔ£¬Ò²³£³£ÐèÒªÐÞ¸ÄʹÓõÄÀàºÍservlet£¬Èç¹ûÊÇʹÓÃwar·½Ê½tomcat¿ÉÒÔ×Ô¶¯ÖØÐ·¢²¼£¬µ«ÊÇͨ³£Çé¿öÏÂÎÒÃÇʹÓÃtomcat¿ª·¢µÄʱºò²»»á½øÐдò°ü·¢²¼£¬ÄÇôÈçºÎÈÃtomcat×Ô¶¯¼ÓÔØÄãÐ޸ĹýÒÔºó¿½±´µ½webappsµÄij¸öÓ¦ÓÃÖеÄÀàÄØ£¿ÆäʵºÜ¼òµ¥£¬¶ÔÓÚij¸öÓ¦Óã¬ÎÒÃÇÒ»°ã»áÔÚtomcatµÄÅäÖÃÎļþserver.xmlΪËü½¨Ò»¸öcontext£¬ÎªÓ¦ÓÃÅäÖÃÊý¾ÝÔ´µÈ£¬ÎÒÃÇÐÞ¸ÄÕâ¸öÓ¦ÓõÄcontext¾Í¿ÉÒÔ´ïµ½ÈÃtomcat×Ô¶¯¼ÓÔØµÄÄ¿µÄ£º
ÀýÈ磺
<Context path="/test" docBase="test"
debug="0" privileged="true" reloadable="true" >
</Context>
×îÖØÒªµÄ¾ÍÊÇ reloadable="true"ÁË¡£
Ïà¹ØÎĵµ£º
×ܽáÒ»£º
Java IOµÄÒ»°ãʹÓÃÔÔò£º
Ò»¡¢°´Êý¾ÝÀ´Ô´£¨È¥Ïò£©·ÖÀࣺ
1¡¢ÊÇÎļþ£º FileInputStream, FileOutputStream, FileReader, FileWriter
2¡¢ÊÇbyte[]£ºByteArrayInputStream, ByteArrayOutputStream
3¡¢ÊÇChar[]: CharArrayReader, CharArrayWriter
4¡¢ÊÇString: StringBufferInputStream, StringReader, StringW ......
package chape8;
/**
* µÚ8ÕÂ
* µÚ46條£º
* for-eachÑ環優ÏÈÓÚforÑ環
* for(Element e : c)
* {
* dosomthing(e);
* }
* Õâ¸öÊÇjava1.5ÒÔÉϵİ汾µÄforÑ»·µÄÊ×ÏÈ¿¼ÂǵÄд·¨
* ÒÔÏÂÊÇjava1.5ÒÔǰµÄ寫·¨
* for (Iterator it = c.iterator();it.hasNext();)
{ ......
package chape8;
import java.math.BigDecimal;
/**
* 8-48
* Èç¹ûÏëÒªÖªµÀ¾«È·µÄ´ð°¸£¬¾ÍÒª±ÜÃâʹÓÃdoubleºÍfloat
¶ÔÓÚ½ðÈÚÐÐÒµÀ´Ëµ£¬¶ÔÊý¾ÝµÄÑÏÕûÐÔÒªÇóÊǺܸߵ쬲»ÈݰëµãÂí»¢£¬
ÄÇ´ó¼Ò¶¼ÖªµÀÔÙÎÒÃǵÄJavaÓïÑÔÀïÃæÓÐÁ½¸ö¸¡µãÊýÀàÐ͵ıäÁ¿floatºÍdouble£¬
¿ÉÄÜ´ó¼Ò»áÈÏΪËûÃǵľ«¶È¶ÔÓÚ½ðÈÚÐÐÒµÕâÑù¶ÔÊý×Öà ......
Character Classes
[abc] Simple character class
[a-zA-Z]   ......
ʹÓÃjar°ü:
commons-pool-1.5.3.jar,tomcat-naming-common.jar,commons-pool-1.5.3-bin.zip,commons-dbcp.jar
×¢Òâ:jdbc Çý¶¯ÒªÓëÊý¾Ý¿â¼æÈÝ.
package test.comm;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Hashtable;
import javax.naming.InitialCont ......