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

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

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

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

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

ÇëÇóÐУ¨
HTTP
·½·¨¡¢ÇëÇóµÄ
URL
¡¢
HTTP
°æ±¾£©¡¢
ÇëÇóÍ·£¨
Host
¡¢
User-Agent
¡¢
Aeecpt
£©¡¢
¿ÕÐС¢ÏûÏ¢Ìå
HTTP
µÄÏìÓ¦£º
       

ÏìÓ¦ÐУ¨
HTTP
°æ±¾¡¢ÏìÓ¦Âë¡¢ÏìÓ¦ÃèÊö£©¡¢
ÏìӦͷ£¨
Content-Type
¡¢
Date
£©¡¢¿ÕÐС¢ÏûÏ¢Ìå
3.      

HTTP
µÄÇëÇóÖÐ
GET
ºÍ
POST
µÄÒìͬ
GET
ûÓÐÏûÏ¢Ì壬
POST
ÓÐÏûÏ¢Ìå¡£
GET
µÄ²éѯÓï¾äÖ±½Ó³öÏÖÔÚÇëÇóÍ·
URL
ºóÃæ¡£
POST
µÄ²éѯÓï¾ä³öÏÖÔÚÏûÏ¢ÌåÖС£
4.      

ÏìÓ¦ÂëµÄÃèÊö
1
××£ºÐÅÏ¢£¬ÇëÇóÊÕµ½£¬¼ÌÐø´¦ÀíÖС£
2
××£º³É¹¦¡£ÐÐΪ±»³É¹¦µØ½ÓÊÜ¡¢Àí½âºÍ²ÉÄÉ¡£
3
××£ºÖض¨Ïò¡£ÎªÁËÍê³ÉÇëÇ󣬱ØÐë½øÒ»²½Ö´Ðж¯×÷¡£
4
××£º¿Í»§¶Ë´íÎó¡£ÇëÇó°üº¬Óï·¨´íÎó»òÕßÇëÇóÎÞ·¨ÊµÏÖ¡£
5
××£º·þÎñÆ÷´íÎó¡£·þÎñÆ÷²»ÄÜʵÏÖÒ»ÖÖÃ÷ÏÔÎÞЧµÄÇëÇó¡£
¶þ¡¢
Javaweb
¹¤×÷µÄÔ­Àí
µ±
web
ä¯ÀÀÆ÷Ïò·þÎñÆ÷ͨ¹ý
HTTP
·¢ËÍÇëÇóʱ£¬
web
·þÎñÆ÷Ö»ÄÜ´¦Àí¾²Ì¬µÄÒ³Ãæ¡£ÓÚÊÇÎÒÃÇÔÚ
web
·þÎñÆ÷ÖмÓÈ븨ÖúÓ¦ÓÃʵÏÖ¶Ô¶¯Ì¬Ò³ÃæµÄÇëÇó¡£ÔÚ
web
·þÎñÆ÷´´½¨¶¯Ì¬·þÎñÆ÷¶ËÄÚÈݵĹý³Ì£¬ÎÒÃdzÆ֮Ϊ·þÎñÆ÷¶ËÍøÒ³±à³Ì¡£´«Í³µÄ½â¾ö·½·¨ÊÇ
CGI
¡¢
ASP
ºÍ
ASP.NET
¡¢
Servlet/jsp
¡£
CGI
£¬¼´Í¨ÓÃÍø¹Ø½Ó¿Ú¡£Ò»¸ö
CGI
³ÌÐò´¦Àí°üÀ¨Á¬½ÓÊý¾Ý¿â¡¢·â×°ÇëÇóÏìÓ¦¶ÔÏó¡¢Ïò¿Í»§¶Ë·¢ËÍÇëÇóµÈ¶à¸öÈÎÎñ¡£¶øÇÒ
CGI
ÊÇ»ùÓÚ½ø³ÌµÄ³ÌÐò£¬Ã¿µ±ÓÐÇëÇóÀ´µ½Ê±¶¼Òª¿ªÆôÒ»¸öеĽø³Ì£¬ÕâÑù´ó´óÀË·ÑÁË×ÊÔ´£¬²¢·¢ÐÔÎÊÌâ½â¾öÐԲ
Servlet/jsp
ÊÇ
Java
·þÎñÆ÷¶ËÍøÒ³±à³ÌµÄ½â¾öģʽ¡£ÆäÔÚ
web
·þÎñÆ÷ÖдæÔÚÒ»¸ö
web
ÈÝÆ÷£¬ÔÚ
web
ÈÝÆ÷ÖдæÔÚ
Servlet
¡£ÆäÖÐ
Web
ÈÝÆ÷ÓÃÓÚ·â×°ÇëÇóÏìÓ¦¶ÔÏ󣬴¦Àí¶àỊ̈߳¬¹ÜÀí
servlet
ÉúÃüÖÜÆÚ£¬´¦Àí¿Í»§¶Ë
socket
£¬°²È«»úÖƵÈÄÚÈÝ¡£¶ø
servlet
ÊÇÒ»¸öÔÚ
web
ÈÝÆ÷ÖÐÔËÐеÄ
Java
³ÌÐò£¬Ö÷ÒªÓÃÀ´ÔÚ·þÎñÆ÷¶Ë²úÉú¶¯Ì¬ÄÚÈÝ¡£
Servlet
ûÓÐ
main
·½·¨


Ïà¹ØÎĵµ£º

Java NIO ѧϰ±Ê¼Ç SocketChannel

ΪÁ˽øÐзÇ×èÈûµÄsocketͨÐÅ£¬java nioÌṩChannel¸ÅÄîµÄʵÏÖ¡£Channel¸ÅÄîÒÔÇø±ðÓÚ´«Í³µÄ»ùÓÚÁ÷¸ÅÄîµÄIO¡£ÊÂʵÉÏChannel¸ÅÄîµÄIO¼È°üÀ¨·Ç×èÈûʽµÄIOÒ²°üÀ¨×èÈûʽIO¡£ÒªChannelÍê³É·Ç×èÈûʽIOÐèҪʵÏÖSelectableChannel½Ó¿Ú£¬ÓëSelector¹ØÁªÊ¹Óá£SocketChannel¾ÍÊÇÕâÑùÒ»¸öSelectableChannel¡£
ÓÉÓÚ£¬selector»úÖƱ¾ÉíÉ ......

Java Web µÚ9Ìì jsp 2

5.      

JSP
±ê×¼¶¯×÷¡¢
JSP
Ö¸ÁîÓÃÓÚÒ³ÃæÓëÈÝÆ÷¼äµÄͨÐÅ£¬¶ø
JSP
±ê×¼¶¯×÷ÓÃÓÚÒ³ÃæÓëÒ³Ãæ»òÕßÒ³ÃæÓë×é¼þ¼äµÄͨÐÅ¡£È磺
<jsp:include
page=”localURL” flush=”true”>
 
6.      

JSP
Òþʽ¶ÔÏó
ÔÚ
......

Effective Java ѧϰ±Ê¼Ç (11)

CloneÕâ¸ö·½·¨ºÜ¼¦Àߣ¬Ô­ÒòÊÇÒòΪËüÊÇÊܱ£»¤µÄ(protected)£¬Æä¶þCloneÕâ¸ö·½·¨ÊÇ¿ÉÑ¡µÄ£¬¼´ÓпÉÄÜÀàûÓÐÌṩÕâ¸ö·½·¨¡£
cloneûÓе÷Óù¹Ô캯Êý£¬¶øÇÒÈç¹û¸¸ÀàûÓÐʵÏÖcloneµÄ»°£¬×ÓÀàÓÀÔ¶Ò²²»¿ÉÄÜÕýȷʵÏÖclone.
×ÜÖ®£¬cloneÊǸöºÜÍ·Í´µÄº¯Êý£¬Èç¹ûÒªÕýȷʵÏÖ£¬±ØÐ뿼Âǵ½É±´µÄÇé¿ö£¬·ñÔò±»¿Ë¡³öÀ´µÄ¶ÔÏó¾Í²»ÊǶÀÁ¢µÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ