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

JSPÖÐrequest¶ÔÏó¡¢session¶ÔÏó¡¢Cookie¶ÔÏóµÄʹÓÃ

¿ÉÒÔʹÓà Application ¶ÔÏóʹ¸ø¶¨Ó¦ÓóÌÐòµÄËùÓÐÓû§¹²ÏíÐÅÏ¢¡£
Request ¶ÔÏó
¿ÉÒÔʹÓà Request ¶ÔÏó·ÃÎÊÈκÎÓà HTTP ÇëÇ󴫵ݵÄÐÅÏ¢£¬°üÀ¨´Ó HTML ±í¸ñÓà POST ·½·¨»ò GET ·½·¨´«µÝµÄ²ÎÊý¡¢cookie ºÍÓû§ÈÏÖ¤¡£Request ¶ÔÏóʹÄúÄܹ»·ÃÎÊ·¢Ë͸ø·þÎñÆ÷µÄ¶þ½øÖÆÊý¾Ý£¬ÈçÉÏÔصÄÎļþ¡£
Response ¶ÔÏó
¿ÉÒÔʹÓà Response ¶ÔÏó¿ØÖÆ·¢Ë͸øÓû§µÄÐÅÏ¢¡£°üÀ¨Ö±½Ó·¢ËÍÐÅÏ¢¸øä¯ÀÀÆ÷¡¢Öض¨Ïòä¯ÀÀÆ÷µ½ÁíÒ»¸ö URL »òÉèÖà cookie µÄÖµ¡£
Server ¶ÔÏó
Server ¶ÔÏóÌṩ¶Ô·þÎñÆ÷Éϵķ½·¨ºÍÊôÐÔ½øÐеķÃÎÊ¡£×î³£Óõķ½·¨ÊÇ´´½¨ ActiveX ×é¼þµÄʵÀý (Server.CreateObject)¡£ÆäËû·½·¨ÓÃÓÚ½« URL »ò HTML ±àÂë³É×Ö·û´®£¬½«ÐéÄâ·¾¶Ó³Éäµ½ÎïÀí·¾¶ÒÔ¼°ÉèÖýű¾µÄ³¬Ê±ÆÚÏÞ¡£
Session ¶ÔÏó
¿ÉÒÔʹÓà Session ¶ÔÏó´æ´¢Ìض¨µÄÓû§»á»°ËùÐèµÄÐÅÏ¢¡£µ±Óû§ÔÚÓ¦ÓóÌÐòµÄÒ³Ö®¼äÌøתʱ£¬´æ´¢ÔÚ Session ¶ÔÏóÖеıäÁ¿²»»áÇå³ý£»¶øÓû§ÔÚÓ¦ÓóÌÐòÖзÃÎÊҳʱ£¬ÕâЩ±äÁ¿Ê¼ÖÕ´æÔÚ¡£Ò²¿ÉÒÔʹÓà Session ·½·¨ÏÔʽµØ½áÊøÒ»¸ö»á»°ºÍÉèÖÿÕÏлỰµÄ³¬Ê±ÆÚÏÞ¡£
ObjectContext ¶ÔÏó
¿ÉÒÔʹÓà ObjectContext ¶ÔÏóÌá½»»ò³·ÏûÓÉ ASP ½Å±¾³õʼ»¯µÄÊÂÎñ¡£ £­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­ request×÷ÓÃÓòÊÇÌá½»Ò³Ã棬¼òµ¥Ëµ¾ÍÊÇÒ³Ãæ¼ä´«µÝ¹¤¾ß£¬¿ÉÒÔÓÃ
request.getParameter("key")
(String)request.getAttribute("key")
sessionµÄ×÷ÓÃÓòÊǻỰ£¬¾ÍÊÇÔڻỰʱ¼äÄÚ¶¼ÓÐЧ£¬
(String)session.getAttribute("key")
sessionµÄʵÖÊÊÇ·þÎñÆ÷³ÌÐò½«sessionµÄ±äÁ¿´æÈëcookie CookieÓÃÓÚ±£´æ¿Í»§ä¯ÀÀÆ÷ÇëÇó·þÎñÆ÷Ò³ÃæµÄÇëÇóÐÅÏ¢£¬³ÌÐòÔ±Ò²¿ÉÒÔÓÃËü´æ·Å·ÇÃô¸ÐÐÔµÄÓû§ÐÅÏ¢£¬ÐÅÏ¢±£´æµÄʱ¼ä¿ÉÒÔ¸ù¾ÝÐèÒªÉèÖá£Èç¹ûûÓÐÉèÖÃCookieʧЧÈÕÆÚ£¬ËüÃǽö½ö±£´æµ½¹Ø±Õä¯ÀÀÆ÷³ÌÐòΪֹ¡£Èç¹û½«Cookie¶ÔÏóµÄExpiresÊôÐÔÉèÖÃΪMinValue£¬Ôò±íʾCookieÓÀÔ¶²»»á¹ýÆÚ¡£Cookie´æ´¢µÄÊý¾ÝÁ¿ºÜÊÜÏÞÖÆ£¬´ó¶àÊýä¯ÀÀÆ÷Ö§³Ö×î´óÈÝÁ¿Îª4096×Ö½Ú£¬Òò´Ë²»ÒªÓÃÀ´±£´æÊý¾Ý¼¯¼°ÆäËû´óÁ¿Êý¾Ý¡£ÓÉÓÚ²¢·ÇËùÓÐä¯ÀÀÆ÷¶¼Ö§³ÖCookie£¬²¢ÇÒÊý¾ÝÐÅÏ¢ÊÇÒÔÃ÷ÎÄÎı¾µÄÐÎʽ±£´æÔÚ¿Í»§¶ËµÄ¼ÆËã»úÖУ¬Òò´Ë×îºÃ²»Òª±£´æÃô¸ÐµÄ¡¢Î´¼ÓÃܵÄÊý¾Ý£¬·ñÔò»áÓ°ÏìÍøÕ¾µÄ°²È«ÐÔ¡£ ʹÓÃCookie¶ÔÏó±£´æºÍ¶ÁÈ¡ÐÅÏ¢µÄ´úÂëÈçÏ¡£ //´æ·ÅÐÅÏ¢
Response.Cookies[" nameID"].Value= " 0001"; //¶ÁÈ¡ÐÅÏ¢


Ïà¹ØÎĵµ£º

Ñù¸Ä±ämyeclipseĬÈϵÄjsp ´ò¿ª·½Ê½

1ÔõÑù¸Ä±ämyeclipseĬÈϵÄjsp ´ò¿ª·½Ê½
preferences->General->editors£­>Files Associations£¨Î»Öøù¾Ý¾ßÌåeclipse°æ±¾»áÓÐËù²»Í¬£© File Types Ñ¡Ôñ.jsp assiciations ÀïÑ¡ÔñMyEclipse jsp editor£¬È»ºóµãÓұߵÄdefault
2,ÉèÖÃMyEclipse ×ÖÌå´óС
ÔÚwindow->perferences->General->Appearance-> ......

jsp,java±àÂëÔ­Àí

Îļþ´ò¿ªÊ±ºòÊÇͨ¹ýÎļþÍ·À´È·¶¨ÎļþµÄ±àÂë
StreamReader   sr=new   StreamReader(@"F:\cym\temp\1.txt");  
  sr.CurrentEncoding   //·µ»Ø±àÂë
ÊÀ½çÉϵĸ÷µØÇø¶¼Óб¾µØµÄÓïÑÔ¡£µØÇø²îÒìÖ±½Óµ¼ÖÂÁËÓïÑÔ»·¾³µÄ²îÒì¡£ÔÚ¿ª·¢Ò»¸ö¹ú¼Ê»¯³ÌÐòµÄ¹ý³ÌÖУ¬´¦ÀíÓïÑÔÎ ......

jbossƽ̨ÏÂjspÁ¬½Ósql2005ºÍsql2000

1¡¢ÅäÖÃjava»·¾³£¬MyEclipse7.0¡£ÅäÖÃjboss5.0£¬Õ¹¿ªÑ¡ÔñjdkΪÒÑ°²×°µÄjdk·¾¶¡£
2¡¢°²×°2005ºÍsql2000£¬×°2000ʱҪװsp4.Çý¶¯Ñ¡Ôñjdbc2.0¡£ÔÙ×°2000ʱʵÀýÃû×Ô¼ºÊäÈëÒ»¸ö¡£ÕâÀïµÄÎÊÌâ¾ÍÊǵǼÃûºÍÃÜÂëµÄÉèÖã¬ÓÒ»÷“SQL   Server×é”ϵÄʵÀýÃû£¨Windows   NT)"µÄ“ÊôÐÔ”£¬ÔÚµ¯³öµÄ¶Ô»°¿ò ......

JSPƬ¶Î

ʹÓÃjspf
ÔÚ¿ª·¢ÖÐдjspÒ³Ãæʱ£¬Í¨³£¶¼ÒªÍ¨¹ýÈçÏ·½Ê½ÔÚjspÎļþÍ·²¿ÒýÈëÎÒÃÇÐèÒªµÄ±êÇ©¿â£¬È磺jspºËÐıêÇ©¿âJSTL£¬Struts ÖеÄ×Ô¶¨Òå±êÇ©£¬Ê±¶ø»¹ÓÐÎÒÃÇ×Ô¼ºÐ´µÄ×Ô¶¨Òå±êÇ©£º
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefi ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ