JspÖеÄapplication¶ÔÏó
Ò»¸öÕ¾µã·þÎñÆ÷ÖÐËùÓеÄÓû§¹«ÓÃÒ»¸öapplication¶ÔÏ󣬵±Õ¾µã·þÎñÆ÷¿ªÆôʱ£¬¸Ã¶ÔÏó¾Í±»´´½¨£¬Ö±µ½ÍøÕ¾¹Ø±Õ£»Ò²¾ÍÊÇ˵£º¸Ã¶ÔÏóÒ»µ©±»´´½¨ÁË£¬Ëü½«±»±£´æÔÚ·þÎñÆ÷ÉÏ£»ËüµÄÉúÃüÖÜÆÚÓë·þÎñÆ÷µÄÉúÃüÖÜÆÚÏàͬ£»³£Ó÷½·¨ÈçÏÂ
setAttribute(String name,Object o)£º½«Ãû×ÖΪname£¬ÖµÎªoµÄÊý¾Ý´æ´¢µ½application¶ÔÏóÖУ»oΪ¶ÔÏóÀàÐÍ
getAttribute(String name)£º»ñÈ¡application¶ÔÏóÖÐÃû×ÖΪnameµÄÖµ
getAttributeNames()£º»ñÈ¡application¶ÔÏóÖд洢µÄËùÓÐÖµµÄÃû×Ö£¬·µ»ØµÄÊÇÒ»¸öEnumerationÀàµÄʵÀý
removeAttribute(String name)£ºÉ¾³ýapplication¶ÔÏóÖÐÃû×ÖΪnameµÄ´æ´¢Öµ
getInitParameter(String name)£º»ñÈ¡application¶ÔÏóÖÐÃû×ÖΪnameµÄ³õʼ´æ´¢Öµ
getServletInfo()£º·µ»ØServlet±àÒëÆ÷µ±Ç°°æ±¾ÐÅÏ¢
Ïà¹ØÎĵµ£º
Ê×ÏÈҪ˵µÄ¾ÍÊÇ ajax ÊÇÎÞ·¨ÊµÏÖÉÏ´«ÎļþµÄ£¬¿ÉÒÔÏëÒ»ÏÂajaxÓëºǫ́ͨÐŶ¼ÊÇͨ¹ý´«µÝ×Ö·û´®£¬ÔõôÄÜ´«µÝÎļþÄØ£¿Æäʵ³öÓÚ°²È«¿¼ÂÇjsÊDz»ÄܲÙ×÷ÎļþµÄ£¬ËùÒԾͲ»ÒªÔÙ˵ÓÃajaxÀ´ÊµÏÖÎļþµÄÉÏ´«ÁË£¬ÕâÊDz»¿ÉÄܵġ£
¶ø±¾ÎÄʵÏÖµÄÎļþÉÏ´«Ò²ÊÇÎÞÒ³Ãæˢеģ¬¿ÉÒÔ˵ÊÇÒ»ÖÖ"ÀàËÆAJAX"·½·¨¡£
&n ......
1.Ê×ÏÈÃ÷È·Á½¸ö¸ÅÄ
·þÎñÆ÷·¾¶£ºÐÎÈ磺http://192.168.0.1/µÄ·¾¶
WebÓ¦Ó÷¾¶£ºÐÎÈ磺http://192.168.0.1/yourwebappµÄ·¾¶
2.¹ØÓÚÏà¶Ô·¾¶Óë¾ø¶Ô·¾¶µÄÃèÊö£º
ServletÖУ¬"/"´ú±íWebÓ¦ÓõĸúĿ¼¡£ºÍÎïÀí·¾¶µÄÏà¶Ô±íʾ¡£ÀýÈ磺"./" ´ú±íµ±Ç°Ä¿Â¼, "../"´ú±íÉϼ¶Ä¿Â¼¡£ÕâÖÖÀàËƵıíʾ£¬Ò²ÊÇÊôÓÚÏà¶Ô·¾¶¡£Õâ ......
<%
//header.jsp
out.println("Protocol: " + request.getProtocol() + "<br>");
out.println("Scheme: " + request.getScheme() + "<br>");
out.println("Server Name: " + request.getServerName() + "<br>" );
out.println(&quo ......
ASPÓëJSPµÄ±È½Ï
´Ó΢ÈíÍƳöÁËASP(ActiveServerPage)ºó£¬ËüÒÔÆäÇ¿´óµÄ¹¦ÄÜ£¬¼òµ¥Ò×ѧµÄÌصã¶øÊܵ½¹ã´óWEB¿ª·¢ÈËÔ±µÄϲ»¶¡£µ«ÊÇËüÈ´ÓÐ΢Èí²úÆ·µÄͨ²¡,Ö»ÄÜÔÚWindowsƽ̨ÏÂʹÓã¬ËäÈ»Ëü¿ÉÒÔͨ¹ýÔö¼Ó¿Ø¼þ¶øÔÚLINUXÏÂʹÓ㬵«ÊÇÆ书ÄÜ×îÇ¿´óµÄDCOM¿Ø¼þÈ´²»ÄÜʹÓ᣶øSUN¹«Ë¾ÔÚJAVAµÄ»ù´¡Ï¿ª·¢³öµÄJSP(Java ServerPages)ʵÏÖÁ˶ ......
¸Ã±êÇ©ÓÃÓÚÔÚµ±Ç°µÄJspÒ³ÃæÖмÓÔØÁíÒ»¸ö¾²Ì¬»ò¶¯Ì¬µÄÎļþÒ³Ãæ
1.¾²Ì¬Îļþ¼ÓÔظñʽ
<jsp:include page=? flush="true/false" />
page£ºÓÃÓÚָʾ±»¼ÓÔصľ²Ì¬Ò³ÃæÎļþÃû
flush£ºÉèÖûº³åÇøÊÇ·ñ¿ÉÓÃ
2.¶¯Ì¬Îļþ¼ÓÔظñʽ
......