jsp:forward±êÇ©Óëresponse.sendRedirect()µÄÇø±ð
1. jsp:forward±êÇ©Ö»ÄÜʵÏÖ±¾ÍøÕ¾ÄÚµÄÌøת£¬¼´ä¯ÀÀÆ÷ÉÏÏÔʾµÄÒÀÈ»ÊÇ֮ǰ¿Í»§¶ËµÄÒ³ÃæÎļþÃû£¬¶ø²»ÊÇÌøתºóµÄÒ³ÃæÎļþÃû
¶øresponse.sendRedirect()¿ÉÒÔÌøתµ½ÈκÎÒ»¸öµØÖ·µÄÒ³Ã棬ÇÒä¯ÀÀÆ÷ÉÏÏÔʾµÄÊÇÌøתºóµÄÒ³ÃæÎļþÃû
2. µ±ÔÚ֮ǰµÄ¿Í»§¶ËÒ³ÃæÎļþÖÐʹÓÃresponse.setAttribute()´æ´¢ÁËij¸öÖµºó£¬Ê¹ÓÃjsp:forward±êÇ©¿ÉÒÔÔÚÌøתҳÃæÖÐͨ¹ý
request.getAttributeÈ¡µÃ´æ´¢µÄÖµ£¬µ«ÊÇʹÓÃresponse.sendRedirect()È¡²»µ½
Ïà¹ØÎĵµ£º
Ê×ÏÈҪ˵µÄ¾ÍÊÇ ajax ÊÇÎÞ·¨ÊµÏÖÉÏ´«ÎļþµÄ£¬¿ÉÒÔÏëÒ»ÏÂajaxÓëºǫ́ͨÐŶ¼ÊÇͨ¹ý´«µÝ×Ö·û´®£¬ÔõôÄÜ´«µÝÎļþÄØ£¿Æäʵ³öÓÚ°²È«¿¼ÂÇjsÊDz»ÄܲÙ×÷ÎļþµÄ£¬ËùÒԾͲ»ÒªÔÙ˵ÓÃajaxÀ´ÊµÏÖÎļþµÄÉÏ´«ÁË£¬ÕâÊDz»¿ÉÄܵġ£
¶ø±¾ÎÄʵÏÖµÄÎļþÉÏ´«Ò²ÊÇÎÞÒ³Ãæˢеģ¬¿ÉÒÔ˵ÊÇÒ»ÖÖ"ÀàËÆAJAX"·½·¨¡£
&n ......
δµÇ½£¬½ûÖ¹·ÃÎÊÈκÎÒ³Ã棬×Ô¶¯Ìøתµ½µÇ½ҳ
package com.catalogeasy.filter;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax. ......
ASPÓëJSPµÄ±È½Ï
´Ó΢ÈíÍƳöÁËASP(ActiveServerPage)ºó£¬ËüÒÔÆäÇ¿´óµÄ¹¦ÄÜ£¬¼òµ¥Ò×ѧµÄÌصã¶øÊܵ½¹ã´óWEB¿ª·¢ÈËÔ±µÄϲ»¶¡£µ«ÊÇËüÈ´ÓÐ΢Èí²úÆ·µÄͨ²¡,Ö»ÄÜÔÚWindowsƽ̨ÏÂʹÓã¬ËäÈ»Ëü¿ÉÒÔͨ¹ýÔö¼Ó¿Ø¼þ¶øÔÚLINUXÏÂʹÓ㬵«ÊÇÆ书ÄÜ×îÇ¿´óµÄDCOM¿Ø¼þÈ´²»ÄÜʹÓ᣶øSUN¹«Ë¾ÔÚJAVAµÄ»ù´¡Ï¿ª·¢³öµÄJSP(Java ServerPages)ʵÏÖÁ˶ ......
¸Ã±êÇ©ÓÃÓÚÏòÄ¿±êÒ³ÃæÖеIJÎÊý´«Öµ£¬¸Ã±êǩͨ³£Óëjsp:include»òjsp:forward±êÇ©Ò»ÆðʹÓÃ
¸ñʽ£º<jsp:param name=? value=? />
name£ºÄ¿±êÒ³ÃæÖеÄij²ÎÊýÃû
value£ºÏònameÖ¸¶¨µÄ²ÎÊýËù´«µÄÖµ
Ò»¸öÒ³ÃæÖпÉÒÔÊ ......
1.jsp:include±êÇ©ÊÇÔÚÖ´ÐÐʱ²Å¶Ô¼ÓÔصÄÎļþ½øÐд¦Àí£¬Òò´ËJspÒ³ÃæºÍËüËù¼ÓÔصÄÎļþÔÚÂß¼ºÍÓï·¨É϶¼ÊǶÀÁ¢µÄ£¬Èç¹û¶Ô¼ÓÔØÎļþ½øÐÐÐ޸ģ¬ÄÇôÔËÐÐʱ¿ÉÒÔ¿´µ½Ëù¼ÓÔØÎļþÐ޸ĺóµÄ½á¹û
2.¶øÓÃincludeÖ¸Áî¼ÓÔØÎļþʱ£¬Êǽ«¼ÓÔØÎļþºÍJspÒ³ÃæºÏ²¢³ÉÒ»¸öеÄJspÒ³Ãæºó£¬·¢Ë͸øJspÒýÇæ½øÐд¦ÀíµÄ£¬Òò´ËÈç¹û¼ÓÔØÎļþ·¢Éú±ä»¯£¬Ôò±Ø ......