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

jsp:include±êÇ©

¸Ã±êÇ©ÓÃÓÚÔÚµ±Ç°µÄJspÒ³ÃæÖмÓÔØÁíÒ»¸ö¾²Ì¬»ò¶¯Ì¬µÄÎļþÒ³Ãæ
1.¾²Ì¬Îļþ¼ÓÔØ¸ñʽ
     <jsp:include page=? flush="true/false" />
     page£ºÓÃÓÚָʾ±»¼ÓÔØµÄ¾²Ì¬Ò³ÃæÎļþÃû
     flush£ºÉèÖûº³åÇøÊÇ·ñ¿ÉÓÃ
2.¶¯Ì¬Îļþ¼ÓÔØ¸ñʽ
     <jsp:include page=? flush="true/false" />
          <jsp:param name=? value=? />
          ....... .......
     </jsp:include>
3.¾²Ì¬ÎļþÓ붯̬ÎļþµÄÇø±ð
     Èç¹û±»¼ÓÔØµÄÎļþÊǾ²Ì¬Îļþ£¬ÄÇôÕâÖÖ¼ÓÔØ½ö½öÊǰѱ»¼ÓÔØÎļþµÄÄÚÈݼӵ½JspÎļþÖÐÈ¥£¬Õâ¸öÎļþ²»»á±»Jsp±àÒëÆ÷Ö´ÐУ»µ«Èç¹ûÕâ¸öÎļþÊǶ¯Ì¬µÄ£¬ÄÇôÕâ¸ö±»¼ÓÔØÎļþÒ²»á±»Jsp±àÒëÆ÷Ö´ÐÐ
×¢Ò⣺µ±ÀûÓøñêÇ©¼ÓÔØJsp´úÂëʱ£¬Jsp´úÂëµÄºó׺ÃûÖ»ÄÜÊÇ.jsp£¬¶ø²»ÄÜÈÎÒâ¸ø
 


Ïà¹ØÎĵµ£º

JSPÖеÄÏà¶Ô·¾¶ºÍ¾ø¶Ô·¾¶

1.Ê×ÏÈÃ÷È·Á½¸ö¸ÅÄ
·þÎñÆ÷·¾¶£ºÐÎÈ磺http://192.168.0.1/µÄ·¾¶
WebÓ¦Ó÷¾¶£ºÐÎÈ磺http://192.168.0.1/yourwebappµÄ·¾¶
2.¹ØÓÚÏà¶Ô·¾¶Óë¾ø¶Ô·¾¶µÄÃèÊö£º
 ServletÖУ¬"/"´ú±íWebÓ¦ÓõĸúĿ¼¡£ºÍÎïÀí·¾¶µÄÏà¶Ô±íʾ¡£ÀýÈ磺"./" ´ú±íµ±Ç°Ä¿Â¼, "../"´ú±íÉϼ¶Ä¿Â¼¡£ÕâÖÖÀàËÆµÄ±íʾ£¬Ò²ÊÇÊôÓÚÏà¶Ô·¾¶¡£Õâ ......

JSPÖеÄÖÐÎÄÂÒÂëÎÊÌâ

ͨ¹ýrequest.getParameter(String name)·½Ê½È¡²ÎÊýnameÖеÄֵʱ£¬ÈçºÎ½â¾öÖÐÎÄÂÒÂëÎÊÌâ
·½·¨Ò»£ºÔÚËùÓеÄȡֵÓï¾ä֮ǰÉèÖÃrequestµÄ±àÂ뷽ʽ£¬¼´request.setCharacterEncoding("utf-8") //utf-8Ò²¿ÉÒÔΪgb2312
            ǰÌáÌõ¼þÊÇ£º²ÎÊýnameËùÔÚµÄÒ³ÃæºÍ»ñÈ¡ ......

JSP/ServletÖеıàÂëÏà¹ØÉèÖÃ

ÔÚJSPºÍServletÖÐÓм¸¸öµØ·½¶¼¿ÉÒÔÉèÖñàÂ룬¸÷¸ö±àÂëµÄ¹¦ÄÜÒ²²»Ò»Ñù£¬±¾ÎĽ«¶Ô¸÷¸ö±àÂë×öÒ»¸öС½á¡£
¸÷ÖÖ±àÂëÒ»ÀÀ
A. JSP/Servlet¶¼ÓеıàÂëÉèÖÃ
1. request.setCharacterEncoding("UTF-8")
2. response.setCharacterEncoding("UTF-8")
3. response.setContentType("text/html;
charset=U ......

ASPÓëJSPµÄ±È½Ï

ASPÓëJSPµÄ±È½Ï
´Ó΢ÈíÍÆ³öÁËASP(ActiveServerPage)ºó£¬ËüÒÔÆäÇ¿´óµÄ¹¦ÄÜ£¬¼òµ¥Ò×ѧµÄÌØµã¶øÊܵ½¹ã´óWEB¿ª·¢ÈËÔ±µÄϲ»¶¡£µ«ÊÇËüÈ´ÓÐ΢Èí²úÆ·µÄͨ²¡,Ö»ÄÜÔÚWindowsƽ̨ÏÂʹÓã¬ËäÈ»Ëü¿ÉÒÔͨ¹ýÔö¼Ó¿Ø¼þ¶øÔÚLINUXÏÂʹÓ㬵«ÊÇÆä¹¦ÄÜ×îÇ¿´óµÄDCOM¿Ø¼þÈ´²»ÄÜʹÓ᣶øSUN¹«Ë¾ÔÚJAVAµÄ»ù´¡Ï¿ª·¢³öµÄJSP(Java ServerPages)ʵÏÖÁ˶ ......

jsp¹ýÂËÆ÷¼òд

package com.pan.encod;
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.servlet.ServletResponse;
public class EncodFilter impl ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ