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

jsp servletÖеĹýÂËÆ÷FilterÅäÖÃ×ܽá

Ô­ÎĵØÖ·£ºhttp://hi.baidu.com/wangking/blog/item/8a109423ff3d2341ac34dec9.html
ÔÚJava web¿ª·¢Öг£»áʹÓõ½¹¦ÄÜÇ¿´óµÄ¹ýÂËÆ÷£¬Ëû±Ï¾¹ÄܸøÎÒÃÇ´øÀ´ºÜ´óµÄ·½±ã£¬µ«ÊÇÕë¶Ô¹ýÂ˵Ä×ÊÔ´ÎÒÃÇÐèÒªÏêϸµÄÁ˽âËûÃÇÔÚweb.xmlÖеÄÅäÖÃÐÅÏ¢¡£Õâ¸ö¸ù¾Ý¼¸ÖÖ³£ÓõIJ»Í¬Çé¿ö½øÐÐÁË×ܽ᣺
1¡£Èç¹ûÒªÓ³Éä¹ýÂËÓ¦ÓóÌÐòÖÐËùÓÐ×ÊÔ´£º
<filter>
    <filter-name>loggerfilter</filter-name>
    <filter-class>myfilter.LoggerFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>loggerfilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
2.¹ýÂËÖ¸¶¨µÄÀàÐÍÎļþ×ÊÔ´
<filter>
    <filter-name>loggerfilter</filter-name>
    <filter-class>myfilter.LoggerFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>loggerfilter</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>
ÆäÖÐ<url-pattern>*.html</url-pattern>Òª¹ýÂËjspÄÇô¾Í¸Ä*.htmlΪ*.jsp,µ«ÊÇ×¢ÒâûÓГ/”б¸Ü
Èç¹ûҪͬʱ¹ýÂ˶àÖÖÀàÐÍ×ÊÔ´£º
<filter>
    <filter-name>loggerfilter</filter-name>
    <filter-class>myfilter.LoggerFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>loggerfilter</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>loggerfilter</filter-name>
    <url-pattern>*.jsp</url-pattern>
</filter-mapping>
3.¹ýÂËÖ¸¶¨µÄĿ¼
<filter>
    <filter-name>loggerfilter</filter-name>
    <filter-class>myfilter.LoggerFilter</filter-class>
</filter>
<filter-mapping>


Ïà¹ØÎĵµ£º

TomcatÏÂjsp,sevlet,javabeanÅäÖÆ


¾­³£¿´µ½jspµÄ³õѧÕßÎÊtomcatÏÂÈçºÎÅäÖÃjsp¡¢servletºÍbeanµÄÎÊÌ⣬ÓÚÊÇ×ܽáÁËÒ»ÏÂÈçºÎtomcatÏÂÅäÖÃjsp¡¢servletºÍben£¬Ï£Íû¶ÔÄÇЩ³õѧÕßÓÐËù°ïÖú¡£
µÚÒ»²½£ºÏÂÔØj2sdkºÍtomcat£ºµ½sun¹Ù·½Õ¾µã£¨http://java.sun.com/j2se/1.4.2/download.html£©ÏÂÔØj2sdk£¬×¢ÒâÏÂÔذ汾ΪWindows Offline InstallationµÄSDK£¬Í¬Ê±×îºÃÏ ......

½éÉÜJSPÊý¾Ý¿â¸ß¼¶²Ù×÷

¼òµ¥½éÉÜJSPÊý¾Ý¿â²Ù×÷µÄ3¸öС¼¼ÇÉ£ºÊý¾ÝÅÅÐò£¬Ö÷/´Ó±í´¦Àí£¬ÊÂÎñ´¦Àí¡£
1¡¡Êý¾ÝÅÅÐò
ÔÚÊý¾Ý¿â¼¼ÊõÖУ¬¿ÉÒÔʹÓÃORDER×Ó¾ä¶Ô²éѯ½á¹û½øÐÐÅÅÐò
[ ORDER BY { order_by_exdivssion[ ASC | DESC]} [ ¸…n ] ]
ÆäÖУ¬order_by_exdivssionÓÃÀ´Ö¸¶¨ÒªÅÅÐòµÄÁУ»ASCÖ¸¶¨°´µÝÔö˳ÐòÅÅÁУ»DESCÖ¸¶¨°´µÝ¼õ˳ÐòÅÅÐò ......

jspµÄsessionÏê½â


http://www.egzcn.com/article/webbc/JSP/2006-03-22/2003.html À´Ô´
ÕªÒª£ºËäÈ»session»úÖÆÔÚwebÓ¦ÓóÌÐòÖб»²ÉÓÃÒѾ­ºÜ³¤Ê±¼äÁË£¬µ«ÊÇÈÔÈ»ÓкܶàÈ˲»Çå³þsession»úÖƵı¾ÖÊ£¬ÒÔÖÁ²»ÄÜÕýÈ·µÄÓ¦ÓÃÕâÒ»¼¼Êõ¡£±¾ÎĽ«ÏêϸÌÖÂÛsessionµÄ¹¤×÷»úÖƲ¢ÇÒ¶ÔÔÚJava web applicationÖÐÓ¦ÓÃsession»úÖÆʱ³£¼ûµÄÎÊÌâ×÷ ......

JSP¹ýÂËÆ÷Ô­Àí·ÖÎö

http://zhangjunhd.blog.51cto.com/113473/20629
1£®Servlet¹ýÂËÆ÷
1.1 Ê²Ã´ÊǹýÂËÆ÷
¹ýÂËÆ÷ÊÇÒ»¸ö³ÌÐò£¬ËüÏÈÓÚÓëÖ®Ïà¹ØµÄservlet»òJSPÒ³ÃæÔËÐÐÔÚ·þÎñÆ÷ÉÏ¡£¹ýÂËÆ÷¿É¸½¼Óµ½Ò»¸ö»ò¶à¸öservlet»òJSPÒ³ÃæÉÏ£¬²¢ÇÒ¿ÉÒÔ¼ì²é½øÈëÕâЩ×ÊÔ´µÄÇëÇóÐÅÏ¢¡£ÔÚÕâÖ®ºó£¬¹ýÂËÆ÷¿ÉÒÔ×÷ÈçϵÄÑ¡Ôñ£º
¢ÙÒÔ³£¹æµÄ·½Ê½µ÷ÓÃ×ÊÔ´£¨¼´£¬µ÷ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ