ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>久久看片网站,一区二区三区中文字幕在线观看,成年人在线观看网站http://www.aygfsteel.com/juhongtao/category/3206.htmlzh-cnMon, 25 Jun 2007 19:55:58 GMTMon, 25 Jun 2007 19:55:58 GMT60 ¾l™TomcatåQŒApacheé…ç½®gzip压羃(HTTP压羃)功能 (è½?http://www.aygfsteel.com/juhongtao/articles/126090.htmljavaGrowingjavaGrowingMon, 25 Jun 2007 06:02:00 GMThttp://www.aygfsteel.com/juhongtao/articles/126090.htmlhttp://www.aygfsteel.com/juhongtao/comments/126090.htmlhttp://www.aygfsteel.com/juhongtao/articles/126090.html#Feedback0http://www.aygfsteel.com/juhongtao/comments/commentRss/126090.htmlhttp://www.aygfsteel.com/juhongtao/services/trackbacks/126090.html 背景åQ?br />HTTP 压羃å¯ä»¥å¤§å¤§æé«˜‹¹è§ˆ¾|‘站的速度åQŒå®ƒçš„åŽŸç†æ˜¯åQŒåœ¨å®¢æˆ·ç«¯è¯·æ±‚网™åµåŽåQŒä»ŽæœåŠ¡å™¨ç«¯ž®†ç½‘™å‰|–‡ä»¶åŽ‹¾~©ï¼Œå†ä¸‹è½½åˆ°å®¢æˆ·ç«¯ï¼Œç”±å®¢æˆïL«¯çš„æµè§ˆå™¨è´Ÿè´£è§£åŽ‹¾~©åƈ‹¹è§ˆã€‚相对于普通的‹¹è§ˆ˜q‡ç¨‹HTML ,CSS,Javascript , Text åQŒå®ƒå¯ä»¥èŠ‚çœ40%å·¦å³çš„æµé‡ã€‚更为é‡è¦çš„æ˜¯ï¼Œå®ƒå¯ä»¥å¯¹åЍæ€ç”Ÿæˆçš„åQŒåŒ…括CGIã€PHP , JSP , ASP , Servlet,SHTML½{‰è¾“出的¾|‘页也能˜q›è¡ŒåŽ‹ç¾ƒåQŒåŽ‹¾~©æ•ˆçŽ‡æƒŠäº?br />
一åQŒå¯¹äºŽTomcat5.0以åŽçš„版本是支æŒå¯¹è¾“出内容进行压¾~©çš„. 使用的是gzip压羃格å¼

䏋颿˜¯tomcat5.5.20 中的$tomcat_home$/conf/server.xml的原内容

 1      < Connector  port ="80"  maxHttpHeaderSize ="8192"
 2                maxThreads ="150"  minSpareThreads ="25"  maxSpareThreads ="75"
 3                enableLookups ="false"  redirectPort ="8443"  acceptCount ="100"
 4                connectionTimeout ="20000"  disableUploadTimeout ="true"  URIEncoding ="utf-8"   />
 5      <!--  Note : To disable connection timeouts, set connectionTimeout value
 6      to 0  -->
 7     
 8      <!--  Note : To use gzip compression you could set the following properties :
 9     
10                compression="on" 
11                compressionMinSize="2048" 
12                noCompressionUserAgents="gozilla, traviata" 
13                compressableMimeType="text/html,text/xml"
14      -->
从上é¢çš„½W?è¡?/strong>内容å¯ä»¥çœ‹å‡ºåQŒè¦ä½¿ç”¨gzip压羃功能åQŒä½ å¯ä»¥åœ¨Connector实例中加上如下属性å³å?br />1) compression="on" 打开压羃功能
2) compressionMinSize="2048" å¯ç”¨åŽ‹ç¾ƒçš„è¾“å‡ºå†…å®¹å¤§ž®ï¼Œ˜q™é‡Œé¢é»˜è®¤äØ“2KB
3) noCompressionUserAgents="gozilla, traviata" 对于以下的æµè§ˆå™¨åQŒä¸å¯ç”¨åŽ‹ç¾ƒÂ 
4) compressableMimeType="text/html,text/xml" 压羃¾cÕdž‹

我这里的é…置内容为:
 1    <Connector port="80" maxHttpHeaderSize="8192"
 2               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
 3               enableLookups="false" redirectPort="8443" acceptCount="100"
 4               connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="utf-8"
 5                  compression="on" 
 6               compressionMinSize="2048" 
 7               noCompressionUserAgents="gozilla, traviata" 
 8               compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"  />
 9    <!-- Note : To disable connection timeouts, set connectionTimeout value
10     to 0 -->
11    
12    <!-- Note : To use gzip compression you could set the following properties :
13    
14               compression="on" 
15               compressionMinSize="2048" 
16               noCompressionUserAgents="gozilla, traviata" 
17               compressableMimeType="text/html,text/xml"
18    -->
19

二,对于Apache而言åQŒæœ‰ä¸¤ç§æƒ…况
   
åQ‘)针对Apache2.0之å‰çš„ç‰ˆæœ¬ï¼Œå®ƒåŽŸæœ¬æ˜¯ä¸æ”¯æŒçš„åQŒä¸˜q‡å¯ä»¥é€šè¿‡æ·ÕdŠ ½W¬ä¸‰æ–¹çš„module_gzipæ¨¡å—æ¥å¯ç”?br />   åQ’)针对Apache2.0åŠä¹‹åŽçš„版本åQŒApacheæä¾›æ”¯æŒ, ä¸è¿‡ä¸å«gzipåQŒè€Œå«mod_deflate
下颞®±å¯¹Apache2.0åŠä¹‹åŽçš„版本作一个说æ˜?br />1) åŽÀLމ#LoadModule headers_module modules/mod_headers.soå‰é¢çš„æ³¨é‡?,
2) æ·ÕdŠ LoadModule deflate_module modules/mod_deflate.so
3) 在VirtualHost中添�br />
1    <Location "/">
2        SetOutputFilter DEFLATE
3        BrowserMatch ^Mozilla/4 gzip-only-text/html
4        BrowserMatch ^Mozilla/4\.0[678] no-gzip
5        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
6        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
7        Header append Vary User-Agent env=!dont-vary
8    </Location>
9

æˆ‘è¿™é‡Œé¢æœ‰ä¸€ä¸ªå®Œæ•´çš„æ¼”示
 1# 加è²deflate模å—
 2LoadModule headers_module modules/mod_headers.so
 3LoadModule deflate_module modules/mod_deflate.so
 4<VirtualHost *:80>
 5    DocumentRoot f:/apacheTest
 6    <Location "/">
 7        SetOutputFilter DEFLATE
 8        BrowserMatch ^Mozilla/4 gzip-only-text/html
 9        BrowserMatch ^Mozilla/4\.0[678] no-gzip
10        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
11        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
12        Header append Vary User-Agent env=!dont-vary
13    </Location>
14</VirtualHost>


]]>
Java中Date¾cÈš„应用http://www.aygfsteel.com/juhongtao/articles/12230.htmljavaGrowingjavaGrowingTue, 06 Sep 2005 07:04:00 GMThttp://www.aygfsteel.com/juhongtao/articles/12230.htmlhttp://www.aygfsteel.com/juhongtao/comments/12230.htmlhttp://www.aygfsteel.com/juhongtao/articles/12230.html#Feedback0http://www.aygfsteel.com/juhongtao/comments/commentRss/12230.htmlhttp://www.aygfsteel.com/juhongtao/services/trackbacks/12230.htmlDate ¾cÕd®žé™…ä¸Šåªæ˜¯ä¸€ä¸ªåŒ…裹类, 它包å«çš„æ˜¯ä¸€ä¸ªé•¿æ•´åž‹æ•°æ®, 表示的是从GMT(格林ž®¼æ²»æ ‡å‡†æ—‰™—´)1970òq? 1 æœ?1æ—?0:00:00˜q™ä¸€åˆÖM¹‹å‰æˆ–者是之厾l历的毫¿U’æ•°.
创å¾ä¸€ä¸ªæ—¥æœŸå¯¹è±?
让我们看一个ä‹É用系¾lŸçš„当剿—¥æœŸå’Œæ—¶é—´åˆ›å»ÞZ¸€ä¸ªæ—¥æœŸå¯¹è±¡åƈ˜q”回一个长整数的简å•例å­? ˜q™ä¸ªæ—‰™—´é€šå¸¸è¢«ç§°ä¸ºJava 虚拟æœ?JVM)ä¸ÀLœºçŽ¯å¢ƒçš„ç³»¾lŸæ—¶é—? 
import java.util.Date; 
public class DateExample1 
{     
public static void main(StringåQ»ï¼½Â args) 
  
{   
     
// Get the system  date/time    
     Date date = new Date();     
     System.
out.println(date.getTime());     
  }
 
}
 
在星期六, 2001òq?æœ?9æ—? 下åˆå¤§çº¦æ˜?:50的样å­? 上é¢çš„例å­åœ¨¾pÈ»Ÿè¾“出讑֤‡ä¸Šæ˜¾½Cºçš„¾l“æžœæ˜?1001803809710. 在这个例å­ä¸­,值得注æ„的是我们使用了Date 构造函数创å»ÞZ¸€ä¸ªæ—¥æœŸå¯¹è±? ˜q™ä¸ªæž„造函数没有接å—ä“Q何傿•? 而这个构造函数在内部使用了System.currentTimeMillis() æ–ÒŽ³•æ¥ä»Ž¾pÈ»ŸèŽ·å–æ—¥æœŸ.

那么, 现在我们已ç»çŸ¥é“了如何获å–从1970òq?æœ?日开始ç»åŽ†çš„æ¯«ç§’æ•îCº†. 我们如何æ‰èƒ½ä»¥ä¸€¿U用æˆäh˜Žç™½çš„æ ¼å¼æ¥æ˜¾½Cø™¿™ä¸ªæ—¥æœŸå‘¢? 在这里类java.text.SimpleDateFormat 和它的抽象基¾c?java.text.DateFormat ž®±æ´¾å¾—上用场äº?


日期数æ®çš„定制格å¼?
å‡å¦‚我们希望定制日期数æ®çš„æ ¼å¼? 比方星期å…?9æœ?29æ—?2001òq? 下é¢çš„例å­å±•½CÞZº†å¦‚何完战q™ä¸ªå·¥ä½œ:
import java.text.SimpleDateFormat; 
import java.util.Date; 
public class DateExample2 
{     
public static void main(StringåQ»ï¼½Â args) 
{ 
SimpleDateFormat bartDateFormat 
=           new SimpleDateFormat("EEEE-MMMM-dd-yyyy");        
 Date date 
= new Date();         System.out.println(bartDateFormat.format(date));    
 }

 }

åªè¦é€šè¿‡å‘SimpleDateFormat 的构造函æ•îC¼ é€’æ ¼å¼å­—½W¦ä¸²"EEE-MMMM-dd-yyyy", 我们ž®Þpƒ½å¤ŸæŒ‡æ˜Žè‡ªå·±æƒ³è¦çš„æ ¼å¼. 你应该å¯ä»¥çœ‹è§? æ ¼å¼å­—符串中的ASCII 字符告诉格å¼åŒ–函æ•îC¸‹é¢æ˜¾½Cºæ—¥æœŸæ•°æ®çš„哪一个部åˆ? EEEE是星æœ? MMMM是月, dd是日, yyyy是年. 字符的个数决定了日期是如何格å¼åŒ–çš?ä¼ é€?EE-MM-dd-yy"会显½C?Sat-09-29-01. 请察看Sun å…¬å¸çš„Web ç«™ç‚¹èŽ·å–æ—¥æœŸæ ¼å¼åŒ–选项的完整的指示.

ž®†æ–‡æœ¬æ•°æ®è§£æžæˆæ—¥æœŸå¯¹è±¡
å‡è®¾æˆ‘们有一个文本字½W¦ä¸²åŒ…å«äº†ä¸€ä¸ªæ ¼å¼åŒ–了的日期对象, 而我们希望解æžè¿™ä¸ªå­—½W¦ä¸²òq¶ä»Žæ–‡æœ¬æ—¥æœŸæ•°æ®åˆ›å¾ä¸€ä¸ªæ—¥æœŸå¯¹è±? 我们ž®†å†‹Æ¡ä»¥æ ¼å¼åŒ–å­—½W¦ä¸²"MM-dd-yyyy" 调用SimpleDateFormat¾c? 但是˜q™ä¸€‹Æ? 我们使用格å¼åŒ–è§£æžè€Œä¸æ˜¯ç”Ÿæˆä¸€ä¸ªæ–‡æœ¬æ—¥æœŸæ•°æ? 我们的例å­? 昄¡¤ºåœ¨ä¸‹é? ž®†è§£æžæ–‡æœ¬å­—½W¦ä¸²"9-29-2001"òq¶åˆ›å»ÞZ¸€ä¸ªå€égØ“001736000000 的日期对è±?

例孽E‹åº:
import java.text.SimpleDateFormat; 
import java.util.Date; 
public class DateExample3 {     
public static void main(StringåQ»ï¼½args) { 
    
// Create a date formatter that can parse dates of  the form MM-dd-yyyy.       
  SimpleDateFormat bartDateFormat = new SimpleDateFormat("MM-dd-yyyy");         
// Create a string containing a text date to be parsed.        
 String dateStringToParse = "9-29-2001";         
try {           
  
// Parse the text version of the date.            
 
// We have to perform the parse method in a           
  
// try-catch construct in case dateStringToParse            
 
// does not contain a date in the format we are expecting.           
  Date date = bartDateFormat.parse(dateStringToParse);            
 
// Now send the parsed date as a long value            
 
// to the system output.            
    System.out.println(date.getTime());         
 }
         
catch (Exception ex) 
    
{            
          System.
out.println(ex.getMessage());         }
   
    }
 
}
 

使用标准的日期格å¼åŒ–˜q‡ç¨‹
既然我们已ç»å¯ä»¥ç”Ÿæˆå’Œè§£æžå®šåˆ¶çš„æ—¥æœŸæ ¼å¼äº? 让我们æ¥çœ‹ä¸€çœ‹å¦‚何ä‹É用内建的格å¼åŒ–过½E? æ–ÒŽ³• DateFormat.getDateTimeInstance() 让我们得以用几ç§ä¸åŒçš„æ–¹æ³•获得标准的日期格å¼åŒ–过½E? 在下é¢çš„例å­ä¸? 我们获å–了四个内建的日期格å¼åŒ–过½E? 它们包括一个短çš? 中等çš? é•¿çš„, 和完整的日期格å¼.
import java.text.DateFormat; 
import java.util.Date; 
public class DateExample4 {     
public static void main(StringåQ»ï¼½Â args) 

{  
   Date date 
= new Date();         
DateFormat shortDateFormat 
= DateFormat.getDateTimeInstance(  DateFormat.SHORT, DateFormat.SHORT);       
   DateFormat mediumDateFormat 
= DateFormat.getDateTimeInstance( DateFormat.MEDIUM,DateFormat.MEDIUM);         
   DateFormat longDateFormat 
=         DateFormat.getDateTimeInstance(         DateFormat.LONG,         DateFormat.LONG);        
   DateFormat fullDateFormat 
=         DateFormat.getDateTimeInstance(         DateFormat.FULL,         DateFormat.FULL);        
   System.
out.println(shortDateFormat.format(date));         
   System.
out.println(mediumDateFormat.format(date));         
   System.
out.println(longDateFormat.format(date));         
   System.
out.println(fullDateFormat.format(date));    
 }
 
}
 

æ³¨æ„æˆ‘们在对 getDateTimeInstance的毋ơ调用中都传递了两个å€? ½W¬ä¸€ä¸ªå‚数是日期风格, è€Œç¬¬äºŒä¸ªå‚æ•°æ˜¯æ—¶é—´é£Žæ ? 它们都是基本数殾cÕdž‹int(æ•´åž‹). 考虑到å¯è¯ÀL€? 我们使用了DateFormat ¾cÀL供的帔R‡: SHORT, MEDIUM, LONG, å’?FULL. è¦çŸ¥é“èŽ·å–æ—¶é—´å’Œæ—¥æœŸæ ¼å¼åŒ–过½E‹çš„æ›´å¤šçš„æ–¹æ³•和选项, è¯ïLœ‹Sun å…¬å¸Web 站点上的解释.

˜q行我们的例å­ç¨‹åºçš„æ—¶å€? å®ƒå°†å‘æ ‡å‡†è¾“凸™®¾å¤‡è¾“å‡ÞZ¸‹é¢çš„内容:
9/29/01 8:44 PM
Sep 29, 2001 8:44:45 PM
September 29, 2001 8:44:45 PM EDT
Saturday, September 29, 2001 8:44:45 PM EDT

]]>
¾lˆäºŽæ‰‘Öˆ°exadel studio pro 3.03ç ´è§£äº?/title><link>http://www.aygfsteel.com/juhongtao/articles/12152.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Tue, 06 Sep 2005 00:47:00 GMT</pubDate><guid>http://www.aygfsteel.com/juhongtao/articles/12152.html</guid><wfw:comment>http://www.aygfsteel.com/juhongtao/comments/12152.html</wfw:comment><comments>http://www.aygfsteel.com/juhongtao/articles/12152.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/juhongtao/comments/commentRss/12152.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/juhongtao/services/trackbacks/12152.html</trackback:ping><description><![CDATA[<FONT color=#000000><FONT face=Arial size=2>Exadel Studio Pro是一个基于Eclipseå¼€å‘环境的web应用开å‘åã^åŽÍ¼Œæ–°ç‰ˆæœ¬åŸºäºŽæ–°˜q‘å‘布的Eclipse 3.1。该工具æä¾›äº†å¯è§†åŒ–çš„web应用开å‘环境,òq¶æ”¯æŒå¤š¿Uå¼€æºæŠ€æœ¯ï¼ŒåŒ…æ‹¬JSFã€Strutsã€Hibernateå’ŒSpring½{‰ç­‰ã€‚新版本æä¾›äº†å®Œå…¨æ‰€è§å³æ‰€å¾—çš„JSP™åµé¢è®¾è®¡å™¨ï¼Œä½¿webåº”ç”¨çš„å¼€å‘æ›´åŠ ç®€ä¾Ñ€?/FONT><BR></FONT><FONT color=#ff0000><STRONG>Exadel Studio Pro For Windows v3.0.3 Final æ­£å¼ç‰?BR>下è²åœ°å€:<A >http://www.ttdown.com/SoftView/SoftView_31389.html</A><BR><FONT color=#000000>需è¦çš„æœ‹å‹èµ¶å¿«åŽÖM¸‹è½?BR>本地下è²:<A href="http://www.aygfsteel.com/Files/juhongtao/Exadel[1].Studio.Pro.v2.5.2.Cracked-FALLEN.ZIP">http://www.aygfsteel.com/Files/juhongtao/Exadel[1].Studio.Pro.v2.5.2.Cracked-FALLEN.ZIP</A></FONT></STRONG></FONT><img src ="http://www.aygfsteel.com/juhongtao/aggbug/12152.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/juhongtao/" target="_blank">javaGrowing</a> 2005-09-06 08:47 <a href="http://www.aygfsteel.com/juhongtao/articles/12152.html#Feedback" target="_blank" style="text-decoration:none;">å‘表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> Ö÷Õ¾Ö©Öë³ØÄ£°å£º <a href="http://" target="_blank">Ì«ºþÏØ</a>| <a href="http://" target="_blank">°²ÇìÊÐ</a>| <a href="http://" target="_blank">Óà¸ÉÏØ</a>| <a href="http://" target="_blank">Àó²¨ÏØ</a>| <a href="http://" target="_blank">ÎèÑôÏØ</a>| <a href="http://" target="_blank">ÖîôßÊÐ</a>| <a href="http://" target="_blank">Íå×ÐÇø</a>| <a href="http://" target="_blank">ÇൺÊÐ</a>| <a href="http://" target="_blank">ÅíÉ½ÏØ</a>| <a href="http://" target="_blank">ÄÏľÁÖÏØ</a>| <a href="http://" target="_blank">Õã½­Ê¡</a>| <a href="http://" target="_blank">ÆÖ½­ÏØ</a>| <a href="http://" target="_blank">ÇìÔÆÏØ</a>| <a href="http://" target="_blank">ïö¹éÏØ</a>| <a href="http://" target="_blank">»³»¯ÊÐ</a>| <a href="http://" target="_blank">ÑïÖÝÊÐ</a>| <a href="http://" target="_blank">½­Ô´ÏØ</a>| <a href="http://" target="_blank">ËÉÌÒ</a>| <a href="http://" target="_blank">¼Ó²éÏØ</a>| <a href="http://" target="_blank">º×·åÏØ</a>| <a href="http://" target="_blank">ÊÙÄþÏØ</a>| <a href="http://" target="_blank">ÉîÔóÏØ</a>| <a href="http://" target="_blank">ÆÖ±±ÏØ</a>| <a href="http://" target="_blank">¸§Ô¶ÏØ</a>| <a href="http://" target="_blank">ÁÙ²×ÊÐ</a>| <a href="http://" target="_blank">äàÑôÊÐ</a>| <a href="http://" target="_blank">ÀèÆ½ÏØ</a>| <a href="http://" target="_blank">°¢Â³¿Æ¶ûÇ߯ì</a>| <a href="http://" target="_blank">Ò˲ýÊÐ</a>| <a href="http://" target="_blank">¼ªÂ¡ÏØ</a>| <a href="http://" target="_blank">ÎÚÀ­ÌØÖÐÆì</a>| <a href="http://" target="_blank">¶«Ïç</a>| <a href="http://" target="_blank">ÎäѨÊÐ</a>| <a href="http://" target="_blank">áÔÃ÷ÏØ</a>| <a href="http://" target="_blank">¹Å½»ÊÐ</a>| <a href="http://" target="_blank">¹àÄÏÏØ</a>| <a href="http://" target="_blank">ÃÚÑôÏØ</a>| <a href="http://" target="_blank">ÖÜ¿ÚÊÐ</a>| <a href="http://" target="_blank">³çÒåÏØ</a>| <a href="http://" target="_blank">Äþ½òÏØ</a>| <a href="http://" target="_blank">®½­ÏØ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>