ÎÒµÄJSPѧϰ±Ê¼Ç JSPÒ³ÃæÖеÄ×¢ÊÍ
JSPÒ³ÃæÖÐÒ»°ãÓÐÁ½Àà×¢ÊÍ
1.html×¢ÊÍ
ÐÎÈç<!--...................-->
Ëü»áͬhtml±ê¼Çһͬ·¢µ½¿Í»§¶Ë
2.jsp×¢ÊÍ£¨3ÖÖ£©
ÐÎÈç<%--.............................--%>
Ëü²»»á±»·¢Ë͵½¿Í»§¶Ë£¬Ö»ÓÃÀ´×¢ÊÍ·þÎñÆ÷¶ËµÄjspÎļþ£¬Á¬jspÉú³ÉµÄservletҲûÓÐ×¢ÊͽøÈ¥£¬ÕâÒ²ÊǴ󲿷ÖÈËʹÓõÄ×¢ÊÍ
ÐÎÈç<%//............................%>ºÍÐÎÈç<%/*................................................*/%>
ËüÊÇ·þÎñÆ÷¶ËµÄ×¢ÊÍ£¬µ«Êǻᱻת»¯³ÉjavaµÄ×¢ÊÍ£¨//................ºÍ/*........................*/£©²¢½«Æä²åÈëÏàÓ¦µÄjspÉú³ÉµÄservletµÄÏàӦλÖÃ
Ïà¹ØÎĵµ£º
ÍøÕ¾×öÍêºó£¬²¢²»ÊÇÖ±½Ó·Åµ½·þÎñÆ÷£¨Tomcat£©ÖÐÈ¥ÔËÐУ¬¶øÊÇÏȽ«Æä´ò°ü³ÉWarÎļþ£¬ÔÙ°ÑWarÎļþ·Åµ½·þÎñÆ÷ÖÐÈ¥ÔËÐУ¬ÄÇÑù¸ü·½±ã
ÄÇôÔõÑù½«Ò»¸öJspÍøÕ¾´ò°üÄØ£¿£¿£¿
Ò».·½·¨Ò»
½øÈëcmdµ½dosÃüÁîÐÐÏ£¬½øÈëJspWeb(×¢ÒâÒª½øÈëJspWebĿ¼£¬¼´½øÈëÄãÒª´ò°üµÄÍøÕ¾µÄ¸ùĿ¼)
ÔÙÏÂÒ»²½
......
ÔÚJava web¿ª·¢Öг£»áʹÓõ½¹¦ÄÜÇ¿´óµÄ¹ýÂËÆ÷£¬Ëû±Ï¾¹ÄܸøÎÒÃÇ´øÀ´ºÜ´óµÄ·½±ã£¬µ«ÊÇÕë¶Ô¹ýÂ˵Ä×ÊÔ´ÎÒÃÇÐèÒªÏêϸµÄÁ˽âËûÃÇÔÚweb.xmlÖеÄÅäÖÃÐÅÏ¢¡£Õâ¸ö¸ù¾Ý¼¸ÖÖ³£ÓõIJ»Í¬Çé¿ö½øÐÐÁË×ܽ᣺
1.Èç¹ûÒªÓ³Éä¹ýÂËÓ¦ÓóÌÐòÖÐËùÓÐ×ÊÔ´£º
<filter>
<filter-name>loggerfilter</filter-name> ......
<html>
<head>
<title>marquee</title>
<style>
#marq {
width:500px;
height:100px;
border:1px solid red;
overflow:hidden;
}
#mar ......
404´íÎóÊÇʲôʱºò²úÉúµÄÄØ£¿µ±ÎÒÃÇͨ¹ýä¯ÀÀÆ÷ÇëÇó·þÎñÆ÷ÉϵÄij¸ö×ÊÔ´µÄʱºò£¬¿ÉÄÜÊÇJSP£¬Ò²¿ÉÄÜÊÇServlet£¬Èç¹ûÒª·ÃÎʵÄ×ÊÔ´²»´æÔÚ£¬¾Í»á²úÉú404´íÎó£¬404´íÎó¿ÉÄÜÊÇÓ¦Óñ¾ÉíµÄÎÊÌ⣬ÀýÈçûÓÐÕý³£²¿Êð¡¢Ãû×Öд´íÁË£¬Ò²¿ÉÄÜÊÇÎļþµÄÎÊÌ⣬JSPÎļþ²»´æÔÚ¡¢Ãû×Ö´íÎ󣬻òÕßServleûÓÐÅäÖá£
¸ù¾ÝÕâЩÇé¿ö£¬404´íÎóµÄ½â¾ ......
À´Ô´ÓÚ¡¶Java¡¢javaEEÈí¼þ¹¤³Ìʦ¾ÍÒµÇóÖ°Êֲᡷ
1 HttpServletRequestÀàµÄrequest¶ÔÏ󣺴ú±íÇëÇó¶ÔÏó£¬Ö÷ÒªÓÃÓÚ½ÓÊÜ¿Í»§¶Ëͨ¹ýHTTPÐÒéÁ¬½Ó´«Êäµ½·þÎñÆ÷µÄÊý¾Ý¡£
2 HttpServletResponseÀàµÄresponse£º´ú±íÏìÓ¦¶ÔÏó£¬Ö÷ÒªÓÃÓÚÏò¿Í»§¶Ë·¢ËÍÊý¾Ý¡£
3 JspWriterÀàµÄout¶ÔÏó:Ö÷ÒªÓÃÓÚÏò¿Í»§¶ËÊä³öÊý¾Ý£¬OutµÄ»ùÀàÊÇJspWriter¡ ......