JSPËÄÖֻỰ¸ú×Ù¼¼Êõ
ת×Ô£ºhttp://blog.sina.com.cn/s/blog_5990faac0100dnfx.html
Cookie
£º·þÎñÆ÷ÔÚÒ»¸öÓ¦´ðÊײ¿´«µÝ¸øä¯ÀÀÆ÷µÄÃû³Æ
/
Öµ¶Ô¡£ä¯ÀÀÆ÷±£´æµÄʱ¼äÓÉ
cookie
µÄ¹ýÆÚʱ¼äÊôÐÔÀ´Ö¸¶¨¡£µ±ä¯ÀÀÆ÷Ïòij¸ö·þÎñÆ÷
·¢ËÍÒ»¸öÇëÇóʱ£¬Ëü»á¼ì²éÆä±£´æµÄ
cookie
£¬²¢ÔÚÇëÇóÊײ¿Öаüº¬´Óͬһ̨·þÎñÆ÷ÉϽÓÊÕµ½µÄËùÓÐ
cookie
¡£
Session tracking
:
ÔÚ
ä¯ÀÀÆ÷ºÍ·þÎñÆ÷Ö®¼ä²»Ö±½Ó´«ËÍËùÓеÄ״̬ÐÅÏ¢£¬¶øÖ»ÊÇ´«µÝ±íʾ·û£¨
session
ID
£©¡£ä¯ÀÀÆ÷·¢ËÍ
sessionID,
·þ
ÎñÆ÷¸ú×ÙÓë¸Ã»á»°Ïà¹ØÁªµÄËùÓÐÐÅÏ¢¡£´«µÝ
sessionID
¿ÉÒÔͨ¹ý
cookie
ºÍ
URL
¸´Ð´¼¼Êõ£¬´ó²¿·ÖÈÝÆ÷¶¼Ö§³ÖÕâÁ½ÖÖ¼¼Êõ¡£·þÎñÆ÷ÎÞ·¨·Ö±æÓû§ÊÇ·ñ¹Ø±ÕÁËä¯ÀÀÆ÷£¬Òò´Ë¹Ø±Õä¯ÀÀÆ÷Òâζ
×ÅÓëÏÈÇ°µÄ»á»°¹ØÁªµÄËùÓлỰÊý¾Ý¶¼±£ÁôÔÚ·þÎñÆ÷ÉÏ£¬Ö±µ½»á»°³¬Ê±£¬·þÎñÆ÷Ïú»Ù»á»°¶ÔÏñ¡£
®
¸ú×Ù
ͬһ»á»°ÖеÄÇëÇóµÄ»á»°
ID
¿ÉÒÔÓжàÖÖ·½·¨£¬Ö÷ÒªÓÐ
cookie
ºÍ
url
¸´Ð´¡£
URL
¸´Ð´
£º°Ñ»á»°
ID
±àÂëÔÚ
URL
ÖС£
Àý£º
counter.jjsp;jsessionnid=be8d697876787876befdbde898789098980
ÕâÑù£¬¼´Ê¹ä¯ÀÀÆ÷²»Ö§³Ö
cookie
£¬Ò²Äܹ»ÊµÏֻỰ¸ú×Ù¡£
¶ÔÓÚ
URL
¸´Ð´£¬·þÎñÆ÷´ÓÇëÇóµÄ
URI
ÖÐÌáÈ¡³ö»á»°
ID
£¬²¢°Ñ¸ÃÇëÇóÓë
ÏàÓ¦µÄ»á»°¹ØÁªÆðÀ´£¬È»ºóÔÚ·ÃÎʻỰÊý¾ÝµÄʱºò£¬
JSP
Ò³ÃæËù½øÐеĴ¦Àí·½Ê½¾ÍºÍʹÓÃ
cookie
¸ú×ٻỰ
id
ʱËùʹÓõķ½Ê½
ÍêÈ«Ïàͬ¡£ËùÒÔ
sesssion
µÄʵÏÖÒªÒÀ¿¿
cookie
»ò
URL
¸´Ð´¼¼Êõ¡£
Èç¹ûÏëΪ²»Ö§³Ö
cookie
µÄä¯ÀÀÆ÷Ìṩ»á»°¸ú×Ù£¬¾Í±ØÐëʹÓÃ
<c:url>
ÐÐΪ¶ÔÓ¦ÓóÌÐòÖеÄËùÓÐ
URL
½øÐи´Ð´¡£ÕâÒâζ×ÅÓ¦ÓóÌÐòÖеÄËùÓÐÒ³Ã棨ÖÁÉÙÊÇÄÇЩ´øÓжÔÆäËûÒ³ÃæÒýÓõÄÒ³Ã棩¶¼±ØÐëÊÇ
JSP
Ò³Ã棬ÕâÑù
Ò³ÃæÒýÓòÅÄÜÒÔ¶¯Ì¬·½Ê½½øÐбàÂ룬Èç¹ûÒÅ©ÁËÒ»¸ö
ur
£¬ÄÇô·þÎñ¾Í»áʧȥ¶Ô»á»°µÄ¸ú×Ù¡£
Òþ²Ø±íµ¥Óò
£ºÒþ²Ø±íµ¥ÓòÊǽ«»á»°IDÌí¼Óµ½HTMLµÄÒþ²Ø±íµ¥ÖÐ(ÀàÐÍΪhiddenµÄinput)¡£
Öض¨ÏòºÍת·¢
¿ÉÒÔʹÓÃÁ½ÖÖ·½·¨À´µ÷ÓÃÁíÒ»
¸öÒ³Ã棬Öض¨ÏòºÍת·¢¡£
i)
ת·¢£º
<jsp:forward
page=”userInfo.jsp”/>
ת·¢
,JSP
ÈÝÆ÷½«Ê¹ÓÃÒ»¸öÄÚ²¿·½·¨À´µ÷ÓÃÄ¿±êÒ³Ã棬еÄÒ³Ãæ¼ÌÐø´¦Àíͬһ¸öÇëÇ󣬶øä¯ÀÀÆ÷²»»áÖªµÀÕâ¸ö¹ý³ÌÉæ
¼°µ½Á˶à¸öÒ³Ãæ¡£ä¯ÀÀÆ÷
UR
Ïà¹ØÎĵµ£º
package com.lsf;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFCell;
import java.sql.*;
import java.io.*;
import java.util.ArrayList;
import java.sql.Co ......
JSPÖеÄpageEncodingºÍ contentTypeÊôÐÔ
¹ØÓÚJSPÒ³ÃæÖеÄpageEncodingºÍcontentTypeÁ½ÖÖÊôÐÔµÄÇø±ð£º
pageEncodingÊÇjspÎļþ±¾ÉíµÄ±àÂë contentTypeµÄcharsetÊÇÖ¸·þÎñÆ÷·¢Ë͸ø¿Í»§¶ËʱµÄÄÚÈݱàÂë JSPÒª¾¹ýÁ½´ÎµÄ“±àÂ딣¬µÚÒ»½×»áÓÃpageEncoding£¬µÚ¶þ½×¶Î»áÓÃutf-8ÖÁutf-8£¬µÚÈý½×¶Î¾ÍÊÇÓÉTomcat³öÀ´µÄÍøÒ³ ......
JSPºÍSERVLETµ½µ×ÔÚÓ¦ÓÃÉÏÓÐʲôÇø±ð£¬ºÜ¶àÈ˸㲻Çå³þ¡£ÎÒÀ´ºú³¶¼¸¾ä°É¡£¼òµ¥µÄ˵£¬SUNÊ×ÏÈ·¢Õ¹³öSERVLET£¬Æ书ÄܱȽÏÇ¿¾¢£¬ÌåϵÉè¼ÆÒ²ºÜÏȽø£¬Ö»ÊÇ£¬ËüÊä³öHTMLÓï¾ä»¹ÊDzÉÓÃÁËÀϵÄCGI·½Ê½£¬ÊÇÒ»¾äÒ»¾äÊä³ö£¬ËùÒÔ£¬±àдºÍÐÞ¸ÄHTML·Ç³£²»·½±ã¡£
ºóÀ´SUNÍƳöÁËÀàËÆÓÚASPµÄÏâǶÐ͵ÄJSP£¬°ÑJSP TAGÏâǶµ½HTMLÓï¾äÖУ¬ÕâÑù£¬¾Í ......
ÏÖÔÚÓкöà³õѧjspµÄÍøÓѾ³£»áÎÊÊý¾Ý¿âÔõôÁ¬½Ó°¡£¬ÔõôÀϳö´í°¡£¿ËùÒÔÎÒ¼¯ÖеÄÔÚÕâдƪÎÄÕ¹©´ó¼Ò²Î¿¼£¬ÆäʵÕâÖÖ°ÑÊý¾Ý¿âÂ߼ȫ²¿·ÅÔÚjspÀïδ±ØÊǺõÄ×ö·¨£¬µ«ÊÇÓÐÀûÓÚ³õѧÕßѧϰ£¬ËùÒÔÎÒ¾ÍÕâÑù×öÁË£¬µ±´ó¼Òѧµ½Ò»¶¨³Ì¶ÈµÄʱºò£¬¿ÉÒÔ¿¼ÂÇÓÃMVCµÄģʽ¿ª·¢¡£ÔÚÁ·Ï°ÕâЩ´úÂëµÄʱºò£¬ÄãÒ»¶¨½«jdbcµÄÇý¶¯³ÌÐò·Åµ½·þÎñÆ÷µÄÀà·¾ ......
½üÆÚµÄÒ»¸öÏîÄ¿ÐèҪʵÏÖÉãÏñͷͼÏñ²É¼¯£¬¾¹ýһϵÁеÄÕÛÌÚÒÔºó£¬ÖÕÓÚʵÏÖÁËÕâ¸ö¹¦ÄÜ£¬ÏÖÕûÀíһϡ£
±¾Éí¾Íjava¼¼ÊõÀ´Ëµ£¬ÒªÊµÏÖÉãÏñÍ·¶þ´Î¿ª·¢£¬²É¼¯ÉãÏñͷͼƬ£¬ÐèҪʹÓõ½JMF£¬JMFÊʺÏʹÓÃÔÚj2se³ÌÐòµ±ÖУ¬ÎÒÐèÒªÔÚweb³ÌÐòÖе÷ÓÃÉãÏñÍ·£¬ºÜÃ÷ÏÔJMFÊǸ㲻¶¨ÁË£¬Ïë¹ýдһ¸öapplet³ÌÐò£¬Ö»ÊÇÄǶ«Î÷ÒªÇó¿Í»§¶Ë±ØÐëÒªÓÐjre»·¾ ......