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

jsp¾Å´óÄÚÖöÔÏó¡¢ËÄÖÖ×÷ÓÃÓò¡¢Ìøת·½Ê½

jspÓÐËÄÖÖÊôÐÔ·¶Î§£º
 page -> Ò³Ã漶±ð£¬ÏÔȻֻÓÐÔÚÒ»¸öÒ³ÃæÄÚ¿ÉÓá£
 request -> ÇëÇ󼶱ð ·þÎñÆ÷Ìøת£¬Ò»´ÎÇëÇóÖ®ºóÏûʧ¡£
 session -> »á»°¼¶±ð ¿Í»§¶ËÌøת£¨·þÎñÆ÷Ìøת£©£¬Óëä¯ÀÀÆ÷Óйأ¬ieÊÇÔÚÖØдò¿ªieʱ²Å»á²»Í¬¡£
 application = Ó¦Óü¶±ð£¬µ±ÖØÆô·þÎñÆ÷ʱ²Å»áÏûʧ
¿Í»§¶ËÌøת£º ¿Í»§¶ËÌøתÊÇ·þÎñÆ÷½«ÇëÇó½á¹û·µ»Ø¸ø¿Í»§¶Ë£¬¿Í»§¶ËÔÙÏò·þÎñÆ÷·¢ÆðÁíÒ»´ÎÇëÇó¡£ÔÚ¿Í»§¶ËÌøתµÄ¹ý³ÌÖУ¬¿Í»§¶ËÒ»¶¨Òª²ÎÓëÌøתµÄ¹ý³Ì¡£¿Í»§¶ËÌøתºóµÄurlÊÇ×îºóÒ»´ÎÇëÇóµÄµØÖ·¡£
¿Í»§¶ËÌøתÄܹ»½øÐÐÍøÕ¾ÍâÌøת¡£
Á´½Ó·½Ê½£º<a href = ""> </a>
±íµ¥Ìá½»
<meta http-equiv = "refresh" content = "3; url = 2.jsp">
javascript:history.back();
response.sendRedirect
response.setHeader("refresh", "3; url = "request2.jsp");
¿Í»§¶ËÌøתʱµÄ"/"±íʾµÄÊÇ·þÎñÆ÷µÄ¸ù
·þÎñÆ÷Ìøת£¨ÈÝÆ÷ÄÚÌøת£©£ºÄܹ»×Ô¶¯µÄÔÚ·þÎñÆ÷ÄÚ²¿½øÐÐÒ³ÃæµÄת»»£¬ËùÒÔ¶ÔÓÚ¿Í»§¶ËÀ´ËµÕâÊÇ͸Ã÷µÄ¡£¶ørequest·¶Î§µÄÊôÐԻᱻ´«µÝµ½ÏÂÒ»¸öÒ³Ãæ¡£·þÎñÆ÷ÌøתÊǵÚÒ»¸öÒ³ÃæµÄµØÖ·¡£
·þÎñÆ÷ÌøתֻÄÜÊÇÕ¾µãÄÚÌøת¡£·þÎñÆ÷ÌøתʱµÄ"/" ´ú±í±¾ÍøÕ¾µÄ¸ù
<jsp:forward page = " "/>
pageContent.forward("request2.jsp");
ÒÔ"/"¿ªÊ¼µÄ·¾¶´ú±í¾ø¶Ô·¾¶£¬·´Ö®´ú±íÏà¶Ô·¾¶
————————————————————ÒÔÉÏΪÕűùjavaÅàѵÊÓƵ±Ê¼Ç————————————————————
JSPΪ¼ò»¯Ò³ÃæµÄ¿ª·¢ÌṩÁËһЩÄÚ²¿µÄ¶ÔÏó£¬ÔÚËùÓеÄJSPÒ³ÃæÖж¼ÄÜʹÓÃÕâЩÄÚ²¿¶ÔÏó¡£±àдJSPµÄÈËÔ±²»ÐèÒª¶ÔÕâЩÄÚ²¿¶ÔÏó½øÐÐÀý»¯£¬Ö»Òªµ÷ÓÃÆäÖеķ½·¨¾ÍÄÜʵÏÖÌض¨µÄ¹¦ÄÜ¡£JSPÖ÷ÒªÓÐÈçÏÂÄÚÖöÔÏó£º
JSPÖоŴóÄÚÖöÔÏóΪ£º
¡¡1¡¢request            ÇëÇó¶ÔÏó¡¡            ÀàÐÍ javax.servlet.ServletRequest        ×÷ÓÃÓò Request
¡¡2¡¢response          ÏìÓ¦¶ÔÏó        &


Ïà¹ØÎĵµ£º

JavaBeanÓëJSP¿ª·¢£¬EL±í´ïʽºÍ×Ô¶¨Òå±êÇ©ÈëÃÅ

JavaBeanµÄ×÷ÓÃÊÇ·â×°Êý¾ÝµÄ
Ìص㣺Õâ¸öjavaÀà±ØÐë¾ßÓÐÒ»¸öÎ޲εĹ¹Ô캯Êý£¬ÊôÐÔ±ØÐë˽Óл¯£¬ÊôÐÔ±ØÐëͨ¹ýpublic·½·¨¸øÆäËû³ÌÐòµ÷ÓÃ
ÆäËü³ÌÐò¿ÉÒÔͨ¹ý·´Éä¼¼ÊõʵÀý»¯JavaBean¶ÔÏ󣬲¢ÇÒͨ¹ý·´ÉäÄÇЩ×ñÊØÃüÃû¹æ·¶µÄ·½·¨£¬´Ó¶ø»ñÖªJavaBeanµÄÊôÐÔ£¬½ø¶øµ÷ÓÃÆäÊôÐÔ±£´æÊý¾Ý¡£
³ÉÔ±ÓëÊôÐÔµÄÇø±ð£ºÀà³ÉԱûÓÐget,set·½·¨£¬Àൠ......

JSP + SQL server 2000¿ª·¢»·¾³µÄ´î½¨

     ´Ó×òÌ쿪ʼ¾ÍÒ»Ö±ÔÚÍøÉϲéÕÒÊý¾Ý¿âΪSQL server 2000 µÄJSP¿ª·¢»·¾³µÄ´î½¨£¬µ½ÏÖÔÚΪֹÖÕÓÚÄܹ»Õý³£Áª½Ó²¢·ÃÎÊ¡£ÒÔÏÂÊǴµÄ²½Ö裺
1¡¢´ÓÍøÉÏÏÂÔØÒ»¸öSQL server 2000 ¸öÈË°æµÄ°²×°°ü£¬°´ÕÕÌáʾ²Ù×÷£¬µ±ÔÚÉí·ÖÑé֤ʱ£¬Ñ¡Ôñ»ìºÏģʽ£¬Óû§saµÄÃÜÂë¿ÉÒÔΪ¿Õ£¬Ò²¿ÉÒÔ²»Îª¿Õ¡£
2¡¢´ÓÍøÉÏÏÂÔØÒ»¸öSQ ......

¹ØÓÚWEB¿ª·¢ jspµÄ°²È«ÐÔ

     ËäÈ»×öÁË´ó°ëÄêµÄweb¿ª·¢ÁË£¬µ«Ò»Ö±¸¡ÓÚ±íÃ棬¶«Î÷»á×ö£¬µ«ºÜ¶àÔ­Àí²»Í¨£¬ÒªÏë³ÉΪ¼¼ÊõÅ£È˹â»á×öÊÇÔ¶Ô¶²»Ðеģ¬ÒòΪ¼´Ê¹»á×öµ«²»»á½²ÇÒ²»ÄܾÙÒ»·´Èý£¬°¥£¬Ïëµ±Äê¸ßÖÐÊýѧ֮ËùÒÔÕâôºÃ¾ÍÊÇÒòΪ¸ßÖÐÊýѧԭÀíÎÒ¶¼Ò»Çå¶þ³þ£¬¾ÙÒ»·´Èý£¬ÐËÊÖÄíÀ´£¬·´¶øµ½ÁËÏÖÔÚÓе㼱¹¦½üÀû£¬¼±ÓÚÇó³É£¬ÎÒÕâ²»Êǵ¹ÍËÁË ......

Á˽âJSPÖÐrequestÊôÐÔµÄÓ÷¨


±¾ÎĽéÉÜJSPÖÐrequestÊôÐÔµÄÓ÷¨£¬ÒÔ¼°request.getParameter() ºÍrequest.getAttribute() Çø±ð¡£
Ò»¡¢request.getParameter() ºÍrequest.getAttribute() Çø±ð
1.request.getParameter()È¡µÃÊÇͨ¹ýÈÝÆ÷µÄʵÏÖÀ´È¡µÃͨ¹ýÀàËÆpost£¬getµÈ·½Ê½´«ÈëµÄÊý¾Ý£¬request.setAttribute()ºÍgetAttribute()Ö»ÊÇÔÚwebÈÝÆ÷ÄÚ²¿Á÷ת£¬½ ......

jsp°üº¬Îļþ¼°Ê¹ÓÃjavabean

£¨Ò»£©°üº¬ÆäËûÒ³ÃæµÄ·½·¨£º
includeÖ¸Á<%@ include file = "test1.jsp" %>
 ¾²Ì¬°üº¬£¬¿ÉÒÔ°üº¬ÈÎÒâ¸ñʽµÄÎļþ£¨²»¹âÊÇjspÎļþ£¬»¹¿ÉÒÔÊÇtxtµÈÎı¾Îļþ£©£¬¾²Ì¬°üº¬¾ÍÊǽ«±»°üº¬ÎļþµÄÄÚÈÝ¿½±´µ½°üº¬ÎļþÖУ¬½øÐÐÖ´ÐС£µ±Ç°Ò³ÃæºÍtest1.jspÖв»ÄÜÓÐÖØÃûµÄ±äÁ¿¡£
include¶¯×÷ <jsp:include page = "tes ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ