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

JSPÖÐʹÓÃIncludeÓëJSP£ºIncludeµÄÇø±ð

ÎÒÃǶ¼ÖªµÀÔÚjspÖÐincludeÓÐÁ½ÖÖÐÎʽ,·Ö±ðÊÇ
< %@ include file=” ”% >
< jsp:include page=” ” flush=”true”/ >
Ç°ÕßÊÇÖ¸ÁîÔªËØ¡¢ºóÕßÊÇÐÐΪԪËØ¡£
¾ßÌåËüÃǽ«Ôںδ¦Óã¿ÈçºÎÓü°ËüÃÇÓÐʲôÇø±ð£¿ÕâÓ¦¸ÃÊǺܶàÈË¿´µ½Ëü¶¼»áÏëµ½µÄÎÊÌâ¡£ÏÂÃæÒ»ÆðÀ´¿´¿´°É¡£
ͨ³£µ±Ó¦ÓóÌÐòÖÐËùÓеÄÒ³ÃæµÄijЩ²¿·Ö£¨ÀýÈç±êÌâ¡¢Ò³½ÅºÍµ¼º½À¸£©¶¼ÏàͬµÄʱºò£¬ÎÒÃǾͿÉÒÔ¿¼ÂÇÓÃinclude¡£¾ßÌåÔÚÄÄЩʱºòÓÃ< % @ include file=” ”% >£¬ÄÄЩʱºòÓÃ< jsp:include page=” ” flush=”true”/ >. ÕâÖÖÐÎʽ¡£Ê×ÏÈÒªÃ÷°×µÄÊÇËüÃÇÖ®¼äµÄÇø±ð¡£Ö»ÓÐÁ˽âÁËËüÃÇÓ÷¨µÄ²»Í¬²ÅÀí½â¸ÃÔÚºÎʱȥÓÃÒÔ¼°ÈçºÎÑ¡Ôñ¡£
< %@ include file=” ”% >,jspµÄincludeÖ¸ÁîÔªËضÁÈëÖ¸¶¨Ò³ÃæµÄÄÚÈÝ¡£²¢°ÑÕâЩÄÚÈݺÍÔ­À´µÄÒ³ÃæÈںϵ½Ò»Æð¡££¨Õâ¸ö¹ý³ÌÊÇÔÚ·­Òë½×¶Î:Ò²¾ÍÊÇjsp±»×ª»¯³ÉservletµÄ½×¶Î½øÐеġ£
ÕâÀï¶Ô·­Òë½×¶Î½øÐÐÒ»ÏÂ˵Ã÷:ÎÒÃÇÖªµÀ£¬jspÒ³Ãæ²»ÄÜÔ­·â²»¶¯µØ±»´«Ë͸øä¯ÀÀÆ÷£¬ËùÓеÄjspÔªËض¼±ØÐëÊ×ÏÈÓÉ·þÎñÆ÷½øÐд¦Àí¡£ÕâÊÇͨ¹ý½«jspÒ³Ãæת´ï»¯³Éservlet£¬È»ºóÖ´ÐÐÕâ¸öservletÀ´Íê³ÉµÄ¡£·þÎñÆ÷ÐèÒªÒ»¸öjspÈÝÆ÷À´´¦ÀíjspÒ³Ãæ¡£jspÈÝÆ÷ͨ³£ÒÔservletµÄÐÎʽÀ´ÊµÏÖ£¬Õâ¸öservlet¾­¹ýÅäÖ㬿ÉÒÔ´¦Àí¶ÔjspÒ³ÃæµÄËùÓÐÇëÇó¡£
JspÈÝÆ÷¸ºÔð½«jspÒ³Ãæת»¯³Éservlet£¨³ÆΪjspÒ³ÃæʵÏÖÀà?JSP Page implementation class£©,²¢±àÒëÕâ¸öservlet¡£ÕâÁ½²½¾Í¹¹³ÉÁË·­Òë½×¶Î.
ÓÉ´ËÎÒÃǾͻáÖªµÀ£ºjspÒ³ÃæÊÇ°ÑincludeÖ¸ÁîÔªËØËùÖ¸¶¨µÄÒ³ÃæµÄʵ¼ÊÄÚÈÝ£¨Ò²¾ÍÊÇ´úÂë¶Î£©¼ÓÈëµ½ÒýÈëËüµÄjspÒ³ÃæÖÐ,ºÏ³ÉÒ»¸öÎļþºó±»jspÈÝÆ÷½«Ëüת»¯³Éservlet¡£¿ÉÒÔ¿´µ½Õâʱ»á²úÉúÒ»¸öÁÙʱclassÎļþºÍÒ»¸öjavaÎļþ¡£ÏÂÃæ¾Ù¸öÀý×Ó¡£
·þÎñÆ÷ÓÃtomcat£¬ÒýÈëÒ³ÃæµÄjspÎļþ½Ðtest.jsp¡£±»ÒýÈëµÄÒ³Ãæ½Ðdate.jsp.Õâ¸öjspÎļþÀï´æ·ÅµÄÊÇÒ»¸öÓйØʱ¼äµÄjsp´úÂë,µ±Ç°µÄÉÏÏÂÎĸùÉèΪtest
//======date.jspµÄÔ´Îļþ=====//
<%@ page language=”java” contentType="text/html;charset=gb2312"%>
<%
java.util.Date date=new java.util.Date();
String date_cn ="";
String dateStr = "";
switch(date.getDay())
{
case 0:date_cn ="ÈÕ"; break;
case 1:date_cn ="Ò»"; break;
case 2:date_cn ="¶þ"; break;
case 3:date_cn ="Èý"; break;
case 4:date_cn ="ËÄ"; break;
case 5:dat


Ïà¹ØÎĵµ£º

JSP+JavaScript´òÔì¶þ¼¶¼¶ÁªÏÂÀ­²Ëµ¥

JSP+JavaScrip
t´òÔì¶þ¼¶¼¶ÁªÏÂÀ­²Ëµ¥£º
(¸öÈ˲©¿Í£ºwww.duduct.com)
class(Ò»¼¶À¸Ä¿ÐÅÏ¢£©£ºclassId(×Ô¶¯±àºÅ£©£¬className£¨À¸Ä¿Ãû³Æ£©,
Nclass£¨¶þ¼¶À¸Ä¿ÐÅÏ¢£©,
NclassId£¨×Ô¶¯±àºÅ£©£¬NclassName(À¸Ä¿Ãû³Æ£©£¬parentId£¨Ò»¼¶À¸Ä¿id£¬Óëclass±íÖеÄclassId¹ØÁª£©
......

ÎåÖÖJSPÒ³ÃæÌøת·½·¨Ïê½â(2)

3. £¼jsp:forward page="" /£¾
ËüµÄµ×²ã²¿·ÖÊÇÓÉRequestDispatcherÀ´ÊµÏֵģ¬Òò´ËËü´øÓÐRequestDispatcher.forward()·½·¨µÄÓ¡¼Ç¡£
Èç¹ûÔÚ֮ǰÓкܶàÊä³ö,Ç°ÃæµÄÊä³öÒÑʹ»º³åÇøÂú,½«×Ô¶¯Êä³öµ½¿Í»§¶Ë,ÄÇô¸ÃÓï¾ä½«²»Æð×÷ÓÃ,ÕâÒ»µãÓ¦¸ÃÌرð×¢Òâ¡£
ÁíÍâҪעÒ⣺Ëü²»Äܸıää¯ÀÀÆ÷µØÖ·£¬Ë¢ÐµĻ°»áµ¼ÖÂÖظ´Ìá½»
4. ÐÞ¸ÄHTTP ......

java jsp servlet filter


×öB/SµÄÆóÒµ¼¶Ó¦Ó㬿ÉÄÜ»áÓöµ½ÕâÑùÒ»ÖÖÇé¿ö£¬¿Í»§µÄÎĵµ£¨wordµÈ£©±£´æÔÚÒ»¸öĿ¼Ï£¬ÐèҪͨ¹ýµÇ¼²ÅÄÜ¿´µ½£¬µ«ÊÇ
ÕâЩÓÖ¶¼ÊǾ²Ì¬µØÖ·£¬ËùÒÔÄÜÖ±½ÓÊäÈëµØÖ·¾Í¿ÉÒÔ·ÃÎʵ½Îĵµ¡£Õâʱ¾ÍÐèÒªÓõ½Filter¹ýÂËÆ÷ÁË¡£
Servlet

APIµÄ2.3°æ±¾µÄÒ»¸öй¦ÄܾÍÊÇÄܹ»ÎªservletºÍJSPÒ³Ã涨Òå¹ýÂËÆ÷¡£¹ýÂËÆ÷ÌṩÁËijЩÔçÆÚ·þÎñÆ÷Ë ......

windows2003ÏÂÅäÖÃJSPÔËÐл·¾³

Ê×ÏÈ£¬±ØÐë˵Ã÷ÕâЩ²»ÊÇÎÒ×Ô¼ºÐ´µÄ£¬µ«ÊǸøÁËÎҺܴó°ïÖú£¬Ï£Íû¶ÔÄãÒ²ÄÜÓÐËù°ïÖú£¡
×£Äã³É¹¦£¡
Ò»¡¢¿ª·¢»·¾³ÅäÖÃ
µÚÒ»²½£ºÏÂÔØj2sdkºÍtomcat£ºµ½sun¹Ù·½Õ¾£¨http://java.sun.com/j2se/1.5.0/download.jsp£©ÏÂÔØj2sdk£¬×¢ÒâÏÂÔذ汾ΪWindows Offline InstallationµÄSDK£¬Í¬Ê±×îºÃÏÂÔØJ2SE 1.5.0 Documentation£¬È»ºóµ½ ......

JSP WEBServerµÄʵÏÖÔ­Àí

ÒòΪҪʵÏÖÒ»¸öWebServer£¬Ð´ÍêÁËÒ»¸ö¼òµ¥µÄWebServerºóÍ»·¢ÆæÏ룬ºÎ²»ÊµÏÖÒ»¸öJSP µÄWebServerÄØ£¿
ÓÐÁËÕâ¸öÏë·¨ºó£¬¾Í¿ªÊ¼¿¼ÂÇJSPµÄʵÏÖÔ­Àí£¬ÆäʵJSPµÄʵÏÖÒ²ºÜ¼òµ¥£¬Ëµ°×Á˾ÍÊǽ«Æäת»»³ÉÒ»¸öJavaÎļþ£¬ÔÙ¶ÔÕâ¸öJavaÎļþ½øÐбàÒ룬Éú³ÉÀàÎļþ£¬½Ó×ÅÔÙÓÉ·þÎñÆ÷ʹÓÃÕâ¸öÀàÎļþ¡£´Ó×ÜÌåÉÏ·Ö£¬¿ÉÒÔ½«JSPÎļþµÄÄÚÈÝ»®·ÖΪÁ½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ