jspÖеÄ×Ô¶¨Òå±êÇ©µÄÓ÷¨
±àд×Ô¶¨Òå±êÇ©²½Öè
±àд±êÇ©´¦ÀíÆ÷£¨´¦Àí±êÇ©µÄJavaÀࣩ£¬ÕâЩÀàÐèҪʵÏÖһЩ¹æ·¶»¯µÄ±êÇ©½Ó¿Ú
±àд±êÇ©¿âÃèÊöÎļþ£¨TLD£©£¬Õâ¸öÎļþÃèÊöÁËÿ¸ö±êÇ©ºÍ¶ÔÓ¦µÄJava±êÇ©´¦ÀíÆ÷ÀàÖ®¼äµÄÓ³Éä¹Øϵ
ÔÚweb.xmlÖÐÅäÖñêÇ©¿âÎļþµÄURI
ÔÚJSPÒ³ÃæÖÐÀûÓÃtaglibÖ¸Á±êÇ©¿âÒýÈëµ½Ò³ÃæÖÐ
¾ßÌåÄÚÈݲο¼¿Î¼þÁË¡£Ö»ËµÒ»Ð©×¢ÒâµÄµØ·½£º
¶¨Òå±êÇ©µÄ´¦ÀíµÄÊÇÒ»¸öÀ࣬¶ø²»ÊÇÒ»¸öservlet£¬ËùÒÔн¨µÄʱºòÔÚMyEclipseÖÐÑ¡Ôñн¨Ò»¸öclass£¬²¢ÇÒ×¢ÒâÒ»¶¨Òª·ÅÔÚÒ»¸ö°üÀ²»ÄÜÖ±½ÓÓÃdefaultpackage,ÏÖÔÚ»¹²»ÖªµÀ½â¾ö°ì·¨¡£
Õû¸ö¹ý³ÌÊÇÕâÑùµÄ£º
jspÖÐʹÓñêÇ©£¬µ±Ò³Ãæ·¢ÏÖ²»ÄÜÔÚĬÈϵıêÇ©¿âÖÐÕÒµ½µÄʱºò£¬»á²éÕÒ<%@ taglib uri="tagliburi" prefix="taglibprefix" %>
È»ºó»áµÃµ½´¦ÀíÕâ¸ö±êÇ©µÄ¶ÔÓ¦µÄtagliburi£¬
ÔÚweb.xmlÖÐÕÒµ½´¦ÀíÕâ¸öuri¶ÔÓ¦µÄtaglib.tld,
<taglib>
<taglib-uri>/mytaglib</taglib-uri>
<taglib-location>/WEB-INF/lib/mytaglib.tld</taglib-location>
</taglib>
ÔÚÕâ¸ötldÖÐÕÒµ½´¦ÀíÕâ¸ö±êÇ©µÄÀ࣬
<tag>
<name>tagname</name><!-- Õâ¸öÊDZêÇ©Ãû--!>
<tag-class>package.class</tag-class><!--Õâ¸öÊǶÔÓ¦µÄ´¦ÀíµÄÀà¡£--!>
<attribute><!--ÕâÊÇ´«µÝµÄ²ÎÊý--!>
<name>color</name>
<requried>false</requried>
</attribute>
</tag>
È»ºó½«²ÎÊýÌá½»¸øÕâ¸öÀ࣬Õâ¸öÀà×ö³öÏàÓ¦µÄ´¦Àí¡£
×îºóΪÌåÏÖÔÚwebÒ³ÃæÉÏ£¬ÊǾ¹ýת»¯µÄhtml±ê¼Ç¡£Àý£¬ÂÔ¡£
Ïà¹ØÎĵµ£º
<c:if>ÓÃÓÚ
Á÷³Ì¿ØÖÆ
Óï·¨
1:
<c:if
test=”testCondition” var=”varName”
[scope=”page|request|session|application”]/>
Óï·¨
2:
<c:if
test=”testCondition” var=”varName”
[scope=&rdquo ......
½«²ÎÊýд³É java.net.URLEncoder.encode(sContent,"gb2312")ºóÔÙ´«µÝ¡£
±ÈÈçurlÊÇ"/accept.do?content=<%=java.net.URLEncoder.encode(sContent,"UTF-8")%>";
¶Áȡʱ£¬Ê¹ÓÃ
String sc = new String(request.getParameter("content").getBytes("iso-8859-1"),"UTF-8"); ......
¡¡¡¡1 MySQL´æ´¢´óÈÝÁ¿µÄ¶þ½øÖÆÎļþµÄ¸ñʽÊÇblob£¬Æäʵ³ýÁËͼƬ»¹¿ÉÒÔ´æ±ðµÄ
¡¡¡¡2 ÒªÏòÊý¾Ý¿â´æ´¢¶þ½øÖƵÄÎļþÒ»¶¨Òª°ÑÒª´æ´¢µÄÊý¾Ýת»»³É¶þ½øÖÆÁ÷
¡¡¡¡·Ï»°¾Í²»¶à˵ÁË£¬´ó¼Ò¿´¿´´úÂëºÜÈÝÒ×Ã÷°×£¬ÏÈÀ´¿´Ò»¸öapp³ÌÐò£¬µ±È»Ê×ÏÈÄúÒªÔÚÊý¾Ý¿âÖÐÏȽ¨Á¢Ò»¸öÓÃÓÚ±£´æͼƬµÄ±íºÍÏàÓ¦µÄÁУ¬Êý¾Ý¸ñʽΪblob
¡¡¡¡ package ......
ÖÕÓڸ㶨JSPÁ¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌâÁË
2008Äê01ÔÂ29ÈÕ ÐÇÆÚ¶þ 15:54
Ç°¼¸Ì죬ƽƽͬѧһֱÔÚ¸ãJSP Á¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌ⣬һֱÁ¬²»ÉÏ£¬È»ºó½ÐÎÒÈ¥°ïËû¿´¿´£¬Æ¾×ÅÒÔÇ°µÄ¾Ñ飬¸ãÁËÒ»¸öÏÂÎ磬ºÙºÙ£¡ÖÕÓÚ°ïËûÁ¬½ÓÉÏÁË£¬Ö÷Òª²½ÖèÈçÏ£º
1¡¢ÐèÒªµÄ¶«Î÷´ó¼Ò¿ÉÒÔµ½Î ......
Ò»°ãµÄÍøÒ³¶¼ÓÐÕâÖÖ¹¦ÄÜ£ºÔÚÒ³ÃæÉ϶¯Ì¬ÏÔʾµ±Ç°Ê±¼ä£¬Õâ¸öµÄʵÏÖÒ²ºÜ¼òµ¥£¬»ù±¾ÉÏÒ»ÐдúÂë¾ÍʵÏÖÁË
<span id="curTime"></span>
<script type="text/javascript"><!--
setInterval("curTime.innerHTML=new Date().toLocaleString()+' ÐÇÆÚ'+'ÈÕÒ»¶þÈýËÄÎåÁù'.charAt(new Date().getDay());",1000 ......