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

JSP±êÇ©

Ò» ¡£×Ô¶¨ÒåJSP±êÇ©µÄ´¦Àí¹ý³Ì£º
¡¡ 1£®ÔÚJSPÖÐÒýÈë±êÇ©¿â£º
¡¡ 2£®ÔÚJSPÖÐʹÓñêÇ©¿â±êÇ©
¡¡ 3£®WebÈÝÆ÷¸ù¾ÝµÚ¶þ¸ö²½ÖèÖеÄprefix£¬»ñµÃµÚÒ»¸ö²½ÖèÖÐÉùÃ÷µÄtaglibµÄuriÊôÐÔÖµ
¡¡ 4£®WebÈÝÆ÷¸ù¾ÝuriÊôÐÔÔÚweb.xmlÕÒµ½¶ÔÓ¦µÄÔªËØ
    5£®´ÓÔªËØÖлñµÃ¶ÔÓ¦µÄÔªËصÄÖµ
    6£®WebÈÝÆ÷¸ù¾ÝÔªËصÄÖµ´ÓWEB-INF/Ŀ¼ÏÂÕÒµ½¶ÔÓ¦µÄ.tldÎļþ
    7£®´Ó.tldÎļþÖÐÕÒµ½Óëtagname¶ÔÓ¦µÄÔªËØ
    8£®´ÓÔªËØÖлñµÃ¶ÔÓ¦µÄÔªËصÄÖµ
    9£®WebÈÝÆ÷¸ù¾ÝÔªËصÄÖµ´´½¨ÏàÓ¦µÄtag handle classµÄʵÀý
    10. WebÈÝÆ÷µ÷ÓÃÕâ¸öʵÀýµÄdoStartTag/doEndTag·½·¨Íê³ÉÏàÓ¦µÄ´¦Àí
¶þ¡£×Ô¶¨Òå±êÇ©²½Öè
1¡£¶¨Òå±êǩʵÏÖÀà
    ¼Ì³Ð×ÔTagSupport»òÕßTagBodySupport
   
    JSPµÄservletÔÚ´¦ÀítagµÄ²»Í¬µãµ÷Óò»Í¬µÄTag handler·½·¨£¬ÕâЩ·½·¨ÔÚTag»òÕßBodyTag½Ó¿ÚÖж¼Óж¨Òå¡£
    µ±JSPµÄservletÓöµ½×Ô¶¨ÒåtagµÄ¿ªÊ¼tagµÄʱºò£¬servletÊ×Ïȵ÷Ó÷½·¨³õʼ»¯ºÏÊʵÄhandler£¬È»ºóµ÷ÓÃhandlerµÄdoStartTag()·½·¨£»
    µ±JSPµÄservletÓöµ½×Ô¶¨ÒåtagµÄ½áÊøtagµÄʱºò£¬servletµ÷ÓÃhandlerµÄdoEndTag()·½·¨¡£ÆäËûµÄ·½·¨ÔÚhandlerÐèҪͬtagµÄbodyÏ໥×÷ÓõÄʱºòµ÷Óá£
   
    doStartTag£ºµ±SPÈÝÆ÷Óöµ½×Ô¶¨Òå±êÇ©µÄÆðʼ±êÖ¾£¬¾Í»áµ÷ÓÃdoStartTag()·½·¨¡£
¡¡                     doStartTag()·½·¨·µ»ØÒ»¸öÕûÊýÖµ£¬ÓÃÀ´¾ö¶¨³ÌÐòµÄºóÐøÁ÷³Ì¡£
¡¡¡¡                  A.Tag.SKIP_BODY£º±íʾ±êÇ©Ö®¼äµÄÄÚÈݱ»ºöÂÔ
¡¡¡¡                  B.Tag.EVAL_BODY_INCLUDE£º±íʾ±êÇ©Ö®¼äµÄÄÚÈݱ»Õý³£Ö´ÐÐ
    doEndTag£ºµ±JSPÈÝÆ÷Óöµ½×Ô¶¨Òå±êÇ©µÄ½áÊø±êÖ¾£¬¾Í»áµ÷ÓÃdoEndTag()·½·¨¡£
                     doEndTag()·½·¨Ò²·µ»ØÒ»¸öÕûÊýÖ


Ïà¹ØÎĵµ£º

JSPÖлñÈ¡µ±Ç°¾ø¶Ô·¾¶

´íÎ󣺠
String realPath  =   " http:// "   +  request.getServerName()  +   " : "   +  request.getServerPort()  +  request.getContextPath();
String realPath  =   " http:// "   +  request.getSer ......

JSPÂÒÂëÎÊÌâµÄ½â¾ö


Ò»¡¢JSPÒ³ÃæÏÔʾÂÒÂë 
¶þ¡¢±íµ¥Ìá½»ÖÐÎÄʱ³öÏÖÂÒÂë 
Èý¡¢Êý¾Ý¿âÁ¬½Óʱ³öÏÖÂÒÂë 
´ó¼ÒÔÚJSPµÄ¿ª·¢¹ý³ÌÖУ¬¾­³£³öÏÖÖÐÎÄÂÒÂëµÄÎÊÌ⣬¿ÉÄÜÒ»ÖÁÀ§ÈÅ×ÅÄú£¬ÎÒÏÖÔÚ°ÑÎÒÔÚJSP¿ª·¢ÖÐÓöµ½µÄÖÐÎÄÂÒÂëµÄÎÊÌâ¼°½â¾ö°ì·¨Ð´³öÀ´¹©´ó¼Ò²Î¿¼¡£ 
 
Ò»¡¢JSPÒ³ÃæÏÔʾÂÒÂë 
ÏÂÃæµÄÏÔʾҳÃæ(display.jsp)¾ ......

ʵÀý½âÎö ÔÚEclipse3.2Éϲ¿ÊðJSPÈ«¹ý³Ì

Ò»¡¢ÏÂÔØ
J2SDK£ºjdk-1_5_0_04-windows-i586-p.exe
ECLIPSE£ºeclipse-SDK-3.2-win32.zip
ECLIPSE ²å¼þ£º
(1)ÖÐÎÄ°ü NLpack1-eclipse-SDK-3.2-win32.zip
(2)Tomcat²å¼þ tomcatPluginV31.zip
(3)LOMBAT£ºlomboz-wtp-emf-gef-jem-3.1.2.zip
TOMCAT£ºapache-tomcat-5.5.17.exe
mysql£ºMysql-5.0.15.rar
¶þ¡¢°²×°
1.°² ......

jspºÍÊý¾Ý¿âÁ¬½Ó´óÈ«

ÏÂÃæµÄjspºÍÊý¾Ý¿âÁ¬½Ó´óÈ«£¬Çë²Î¿¼
Ò»¡¢jspÁ¬½ÓOracle8/8i/9iÊý¾Ý¿â£¨ÓÃthinģʽ£©
testoracle.jspÈçÏ£º
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<html>
<body>
<%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Stri ......

JSPÄÚ½¨¶ÔÏó

¢Ù out - javax.servlet.jsp.jspWriter
   out¶ÔÏóÓÃÓڰѽá¹ûÊä³öµ½ÍøÒ³ÉÏ¡£
·½·¨£º
1. void clear() ;
   Çå³ýÊä³ö»º³åÇøµÄÄÚÈÝ£¬µ«ÊDz»Êä³öµ½¿Í»§¶Ë¡£
2. void clearBuffer() ;
   Çå³ýÊä³ö»º³åÇøµÄÄÚÈÝ£¬²¢Êä³öµ½¿Í»§¶Ë¡£
3. void close() ;
   ¹Ø±ÕÊä³öÁ÷£¬Çå³ýËùÓÐÄÚ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ