Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java Web µÚ8Ìì ¹ýÂËÆ÷

Ò»¡¢
ʲôÊǹýÂËÆ÷
´Ó¼¼ÊõÉϽ²¹ýÂËÆ÷ÊÇÒ»¸öÖмä×é¼þ£¬ÓÃÓÚÀ¹½ØÔ´Êý¾ÝºÍÄ¿µÄÊý¾Ý¼äµÄÏûÏ¢£¬²¢ÇÒ¹ýÂ˶þÕßÖ®¼ä´«µÝµÄÊý¾Ý¡£¶ÔÓÚ
WEB
Ó¦ÓóÌÐò£¬¹ýÂËÆ÷ÊÇפÁôÔÚ
WEB
·þÎñÆ÷ÉϵÄ
WEB
×é¼þ¡£¶ÔÓÚ¿Í»§¶ËºÍÄ¿±ê×ÊÔ´¶øÑÔ¹ýÂËÆ÷ÊÇ͸Ã÷µÄ£¬ËûÃÇÊDz»ÖªµÀ·¢ËÍÀ´µÄÊý¾ÝÊÇ·ñ¾­¹ý¹ýÂËÆ÷µÄ´¦Àí¡£
¶þ¡¢
¹ýÂËÆ÷µÄ×÷ÓÃ
¹ýÂËÆ÷Ï൱ÓÚÒ»¸ö¾¯ÎÀ£¬×èÖ¹²»ÏëÒªµÄÐÅÏ¢´ÓÒ»¸öµã´«µÝµ½ÁíÒ»¸öµã¡£ÎÒÃÇͨ³£ÀûÓùýÂËÆ÷½øÐÐÒÔϼ¸ÖÖÓ¦Óãº
l
        

ÈÏÖ¤¹ýÂË
l
        

µÇ½ºÍÉóºË¹ýÂË
l
        

ͼÏñת»»¹ýÂË
l
        

Êý¾ÝѹËõ¹ýÂË
l
        

¼ÓÃܹýÂË
l
        

ÁîÅƹýÂË
l
        

×ÊÔ´·ÃÎÊ´¥·¢Ê¼þ¹ýÂË
l
        

XSLT
¹ýÂË
l
        

MIME-type
¹ýÂË
Èý¡¢
¹ýÂËÆ÷µÄÉúÃüÖÜÆÚ
Ò»¸ö¹ýÂËÆ÷Òª¾­¹ý±àÂë¡¢±àÒë¡¢²¿Êð¡¢ÔËÐÐËĸö²½Öè¡£
l
        

µ±·þÎñÆ÷Æô¶¯Ê±£¬
web
ÈÝÆ÷µ÷ÓÃ
init()
·½·¨¶Ô¹ýÂËÆ÷½øÐгõʼ»¯£¬
init
£¨£©Õâ¸ö·½·¨Ö»Ö´ÐÐÒ»´Î¡£
l
        

·þÎñÆ÷Æô¶¯ºó£¬µ±Âú×ãÒªÇóµÄÊý¾Ýµ½À´Ê±
web
ÈÝÆ÷µ÷ÓÃ
doFilter()
·½·¨¶ÔÊý¾Ý½øÐйýÂË¡£
l
        

µ±·þÎñÆ÷¹Ø±Õʱ
web
ÈÝÆ÷µ÷ÓÃ
destroy()
·½·¨Ïú»Ù¹ýÂËÆ÷¡£
ËÄ¡¢
ÔõÑù±àд¹ýÂËÆ÷
1£® 
ÎÒÃDZàдµÄ¹ýÂËÆ÷Ó¦¸ÃʵÏÖ
Filter
½Ó¿Ú£¬²¢ÊµÏÖÀïÃæµÄÈ«²¿·½·¨¡£
2£® 
ÔÚ
web.xml
ÎļþÖÐʵÏÖ¹ýÂËÆ÷µÄÅäÖ㨺Í
Servlet
ÀàËÆ£©¡£
Îå¡¢
Ò»¸ö
servlet
¶ÔÓ¦¶à¸ö¹ýÂËÆ÷ʱºò¹ýÂËÆ÷Ö´ÐÐ˳Àû
1.      

·¶Î§´óµÄÏÈÖ´ÐУ¬·¶Î§Ð¡µÄºóÖ´ÐС£
2.      

ÏÈÖ´ÐÐ
<url-pattern>
ºóÖ´ÐÐ
<servler-name>
3.      

ͬΪ
<url-pattern>
»òͬΪ
<servler-na


Ïà¹ØÎĵµ£º

Java»ù´¡Æª£º£¨¶þ£©java±à³Ì»ù´¡

Ò»¡¢Java³ÌÐò×é³É
java³ÌÐòÊÇÓÉÀà×é³ÉµÄ£¬ÎļþµÄÀàÐÍÊÇ*.java¡£Ò»¸öjavaÎļþµÄ×é³ÉÈçÏ£º
public class MyJava {
              
}
Õâ¾ÍÊÇÒ»¸ö×î¼òµ¥µÄjavaÀà¡£Õâ¾ä»°µÄ×÷ÓþÍÊÇÉùÃ÷Ò»¸öÀ࣬
       public ·ÃÎÊÐÞ ......

¹ØÓÚJavaµÄ¾²Ì¬³õʼ»¯¿é

      ÃæÊÔʱºò¾­³£»áÅöµ½µÄÒ»¸öÎÊÌ⣬¸øÄãÁ½¸ö¼Ì³Ð¹ØϵµÄjavaÀàµÄ´úÂ룬ÕâÁ½¸öÀàÖÐÓй¹Ôì·½·¨ºÍһЩ±äÁ¿£¬È»ºó»¹ÓÐһЩ·½·¨£¬·½·¨Àïͨ³£Óн«±äÁ¿Êä³öµÄÓï¾ä¡£ÕâÀàÎÊÌâÖ÷Òª¿¼²ìÎÒÃǶԸ¸Àà×ÓÀà³õʼ»¯Ë³ÐòµÄÁ˽âÇé¿ö¡£
      ÕâÀïÎÒÃÇÖ÷ÒªÌÖÂÛϾ²Ì¬³õʼ»¯¿éÕâÖÖÇé¿ö¡£
......

Effective Java ѧϰ±Ê¼Ç £¨10£©

java.lang.Object ÌṩÁËÒ»¸ötoString()µÄ·½·¨£¬µ«Êµ¼ÊÉÏÕâ¸ö·½·¨·µ»ØµÄÍùÍù²»ÊÇÎÒÃÇÐèÒªµÄ£¬Ëü·µ»ØµÄÊÇÀàÃû¼ÓÉÏ“@”¼ÓÉÏÊ®Áù½øÖƵÄhashÖµ¡£ÕâÏÔÈ»²»ÊÇÎÒÃÇÏëÒªµÄ£¬ËùÒÔ±ØÐëÖØÔØtoStringº¯Êý¡£
ºÜ¼òµ¥µÄÀý×Ó£¬ÈçÏÂ
System.out.println("Failed to connect: " + phoneNumber);
Èç¹û²»ÖØÔØ£¬ÔòÓÐ
Failed to co ......

JAVA Web ±à³ÌµÚÒ»Ìì

Ò»¡¢
HTTP
ЭÒéµÄÀí½â
1.      

ʲôÊÇ
HTTP
ЭÒé
HTTP
ÊÇÒ»ÖÖ³¬±¾ÎÄ´«ÊäЭÒ飬ÊÇÒ»Ì×¼ÆËã»úÔÚÍøÂçÖÐͨÐŵĹæÔò¡£ËûÊÇÒ»ÖÖÎÞ״̬µÄ´«Ê䷽ʽ¡£
2.      

HTTP
ЭÒéµÄ¸ñʽ
HTTP
µÄÇëÇó£º
       

Ç ......

Java Web µÚÆßÌì ФÀÏ´®½²+¹ºÎﳵС½á

ͨ¹ý
½ñÌìСÀÏʦ¶Ô
Javaweb
µÄ´®½²£¬×Ô¼º×î´óÊÕ»ñÊǶÔÕû¸öjavaWebÓÐÁËÒ»¸öϵͳµÄÀí½â£¬¶ÔʵÏÖ¸÷¸ö²½ÖèµÄÔ­ÀíÓÐÁËÒ»¸öÈÚ»á¹áͨ£¬ÕûÌå֪ʶµãÒ²´®ÁªÁËÆðÀ´£¬×Ô¼ºµÄ˼ÏëÒ²´ÓÒÔÇ°µ¥´¿µÄÀûÓÃ
Java
´úÂë±àдÏÖʵÏîÄ¿³ÌÐòµ½Ó¦ÓÃÏÖÓй¤¾ß·½±ã¿ì½ÝµÄ·¢¿ª³öÏîÄ¿³ÌÐòµÄ¹ý¡£ÏÖÔڻعË֮ǰ6ÕµÄ֪ʶµãÄÚÈÝ£¬
Javaweb
¸Ð¾õÇåÎúÁ˺ܶà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ