Java/jsp ºÃµÄÈëÃÅÎÄÕ¹²ÉÍ
ÓÃJSP¹¹½¨¶¯Ì¬ÍøÕ¾ ËïÒÔÒå ¶Å¾é
Ò»¡¢ ʲôÊÇJSP JSP(JavaServer Pages)ÊÇÓÉSun Microsystems¹«Ë¾³«µ¼¡¢Ðí¶à¹«Ë¾²ÎÓëÒ»Æð½¨Á¢µÄÒ»ÖÖ¶¯Ì¬ÍøÒ³¼¼Êõ±ê×¼£¬ÆäÍøַΪ
http://www.javasoft.com/products/jsp¡£ ÔÚ´«Í³µÄÍøÒ³HTMLÎļþ(*.htm,*.html)ÖмÓÈëJava³ÌÐòƬ¶Î(Scriptlet)ºÍJSP±ê¼Ç(tag)£¬¾Í¹¹
³ÉÁËJSPÍøÒ³(*.jsp)¡£Web·þÎñÆ÷ÔÚÓöµ½·ÃÎÊJSPÍøÒ³µÄÇëÇóʱ£¬Ê×ÏÈÖ´ÐÐÆäÖеijÌÐòƬ¶Î£¬È»ºó½«Ö´Ðнá¹ûÒÔHTML¸ñʽ·µ»Ø¸ø¿Í»§¡£³Ì
ÐòƬ¶Î¿ÉÒÔ²Ù×÷Êý¾Ý¿â¡¢ÖØж¨ÏòÍøÒ³ÒÔ¼°·¢ËÍ email µÈµÈ£¬Õâ¾ÍÊǽ¨Á¢¶¯Ì¬ÍøÕ¾ËùÐèÒªµÄ¹¦ÄÜ¡£ËùÓгÌÐò²Ù×÷¶¼ÔÚ·þÎñÆ÷¶ËÖ´ÐУ¬ÍøÂç
ÉÏ´«Ë͸ø¿Í»§¶ËµÄ½öÊǵõ½µÄ½á¹û£¬¶Ô¿Í»§ä¯ÀÀÆ÷µÄÒªÇó×îµÍ£¬¿ÉÒÔʵÏÖÎÞPlugin£¬ÎÞActiveX£¬ÎÞJava Applet£¬ÉõÖÁÎÞFrame¡£ ±¾ÎĽ«½é
ÉÜÀûÓÃJSP¼¼Êõ¿ª·¢¶¯Ì¬ÍøÒ³µÄ·½·¨£¬»¹½«¼òÒª·ÖÎöJSP¼¼ÊõºÍ Microsoft ¹«Ë¾µÄ ASP ¼¼ÊõµÄ²»Í¬Ö®´¦¡£
¶þ¡¢ ÈçºÎ°²×°ºÍÆô¶¯ ΪÁËʵÑéJSP¼¼Êõ£¬Ê×ÏÈÐèÒª½¨Á¢ÔËÐл·¾³£¬Õâ¸ö¹ý³ÌÏ൱¼òµ¥£º
1¡¢ÔÚ http://java.sun.com/jdk/´¦ÏÂÔØJDK(Java 2 SDK¡¢Standard Edition¡¢v 1.2.2)¡£
2¡¢ÔÚhttp://java.sun.com/products/jsp/´¦ÏÂÔØJSWDK(JavaServer Web Development Kit 1.0.1)¡£LinuxÓû§¿ÉÒÔÔÚ
ttp://jakarta.apache.org/´¦ÏÂÔØTomcat 3.0¡£
3¡¢°²×° ÒÔWindows NT»·¾³ÎªÀý£¬JDKµÄ°²×°ÊÇÊ×ÏÈÔËÐÐÏÂÔصõ½µÄjdk1_2_2-win.exe£¬È»ºóÐÞ¸Äϵͳ»·¾³²ÎÊý£¬ÔÚPATH²ÎÊýÖмÓÈë
[x:]\jdk1.2.2\binÒÔ¼°Ôö¼ÓеĻ·¾³²ÎÊý CLASSPATH=[x:]\jdk1.2.2\lib\tools.jar£¬ÆäÖÐ[x:]ÊÇ°²×°JDKµÄÓ²ÅÌ·û£¨c:¡¢d: µÈ£©¡£ JSWDKµÄ
°²×°½öÐ轫jswdk1_0_1-win.zip´øĿ¼Êͷŵ½Ó²Å̸ùĿ¼Ï£¨c:\¡¢d:\ µÈ£©£¬È»ºó¾Í¿ÉÒÔÔÚÓ²ÅÌÉÏÕÒµ½\jswdk-1.0.1\Ŀ¼¡£½«À´Èç¹û²»Ïë
±£ÁôJSWDK£¬É¾³ýÕâ¸öĿ¼¾Í¿ÉÒÔÁË£¬Ã»ÓÐÈκÎϵͳÎļþºÍ×¢²á±íÒÅÁôÎÊÌâ¡£¸üÏêϸµÄ°²×°¹ý³ÌÒÔ¼°Solaris/UnixºÍLinuxÏÂJDK¡¢Tomcat
µÄ°²×°¿ÉÒԲο¼ÏÂÔصõ½µÄÎļþ°üÖеݲװ˵Ã÷¡£
4¡¢Æô¶¯ ÒÔWindows NT»·¾³ÎªÀý£¬ÔÚ\jswdk-1.0.1\Ŀ¼ÏÂÖ´ÐÐstartserver.bat£¬¾Í¿ÉÆô¶¯JSWDKÖÐÒ»¸öÖ§³ÖJSPÍøÒ³¼¼ÊõµÄWeb·þÎñÆ÷¡£
ΪÁ˲»ÓëÏÖÓеÄWeb·þÎñÆ÷£¨ÀýÈçIIS¡¢PWSµÈ£©³åÍ»£¬JSWDKµÄWeb·þÎñÆ÷ʹÓÃÁË8080¶Ë¿Ú¡£ ÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖмüÈë
http://localhost:8080»òÕßhttp://127.0.0.1:8080ºó£¬Èç¹ûÄÜ¿´µ½ JSWDK µÄ»¶ÓÒ³¾Í˵Ã÷JSPʵÑé»·¾³ÒѾ½¨³É£¬¿É½øÈëÏÂÒ»²½ÊµÑé¡£
Òª¹Ø±ÕWeb·þÎñÆ÷ÔòÔËÐÐstopserver.bat¡£
Èý¡¢ JSP¼òµ¥Ê¾Àý JSWDKÖа
Ïà¹ØÎĵµ£º
1 ×÷ÓÃÓò
javaÖÐ×÷ÓÃÓòµÄ·¶Î§ÓÉ»¨À¨ºÅ±êʾ¡£
2¹ØÓÚstatic
À¬»øÊÕ¼¯Æ÷Ö»ÖªµÀËѼ¯ÄÇЩÓÐnewÔËËã·û·ÖÅäµÄÄڴ棬²»ÖªµÀÈçºÎÊÍ·ÅÌØÊâÄÚ´æ¡£
Èç¹ûÀ¬»øÊÕ¼¯Æ÷×¼±¸»ØÊÕ¶ÔÏóµÄÄڴ棬ËüÊ×Ïȵ÷ÓÃfinalize()£¬¶øÇÒÖ»ÓÐÔÚÏÂÒ»´ÎÀ¬»øËѼ¯¹ý³ÌÖУ¬²Å»áÕæÕý»ØÊÕ¶ÔÏóµÄÄÚ´æ¡£ËùÒÔ˵Èç¹ûʹÓÃ
final ......
Thread-Per-Message PatternµÄ²ÎÓëÕߣº
1. Client£¨Î¯ÍÐÈË£©²ÎÓëÕß
Client²ÎÓëÕß»á¶ÔHost²ÎÓëÕß·¢³öÇëÇó¡£Client²ÎÓëÕß²¢²»ÖªµÀHost²ÎÓëÕß»áÈçºÎʵÏÖÕâ¸öÇëÇó¡£
2. Host²ÎÓëÕß
µ±Host²ÎÓëÕß½ÓÊÕµ½Client²ÎÓëÕßµÄÇëÇóʱ£¬»á½¨Á¢ÐµÄÏ̲߳¢Æô¶¯Ëü¡£
Õâ¸öеÄÏ ......
1.³éÏó£º
¡¡¡¡³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.¼Ì³Ð£º
¡¡¡¡¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ÐÍ£¬²¢ÇÒÔÊÐíºÍ¹ÄÀøÀàµÄÖØÓã¬ËüÌṩÁËÒ»ÖÖÃ÷È· ......
×î½ü³õ²½½Ó´¥ÁËÏÂJava¼ÓÃܺÍÊý×ÖÇ©ÃûµÄÏà¹ØÄÚÈÝ£¬ÎÒѧϰµÄ¹ý³Ì´ó¸Å·ÖÎå²½£º
1£©ÏûÏ¢ÕªÒª
2£©Ë½Ô¿¼ÓÃÜ
3£©¹«Ô¿¼ÓÃÜ
4£©Êý×ÖÇ©Ãû
5£©Êý×ÖÖ¤Êé
ÏÂÃæµÄ´úÂëÊǵÚÈý²¿·Ö£º¹«Ô¿¼ÓÃÜ
Ï£ÍûÄÜΪ¸Õ¸Õ½Ó´¥Õâ¸öµÄÅóÓÑÃÇÊ¡µãÊÂ
package security;
import java.security.KeyPair;
import java.security.KeyPairGenerator ......