BorderJ's Blog
--- java FreeBsd Web3D open-sources
BlogJava
::
首頁(yè)
::
新隨筆
::
聯(lián)系
::
聚合
::
管理
::
8 隨筆 :: 1 文章 :: 40 評(píng)論 :: 0 Trackbacks
<
2006年7月
>
日
一
二
三
四
五
六
25
26
27
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
常用鏈接
我的隨筆
我的評(píng)論
我的參與
最新評(píng)論
留言簿
(4)
給我留言
查看公開(kāi)留言
查看私人留言
隨筆分類(lèi)
Eclipse (1)
(rss)
Java(4)
(rss)
open-sources
(rss)
PHP(1)
(rss)
Unix
(rss)
安全 (1)
(rss)
網(wǎng)絡(luò) (1)
(rss)
隨筆檔案
2006年8月 (1)
2006年7月 (7)
文章分類(lèi)
Struts文檔(1)
(rss)
文章檔案
2006年7月 (1)
Bloger
洪亮(Leon Hong)
車(chē)東
Java
Chinese_Java_API
javalobby
JavaWorld@TW
Java研究組織
Jspolympus
matrix
onjava
sun社區(qū)
TheServerSide(TSS)
MyBlog's List
Calendar@Google
MyBlog@blogjava
MyBlog@csdn
MyBlog@Google
(rss)
MyBlog@yahoo
open-sources
eclipse
java-source
sourceforge
灰狐
security
天天安全網(wǎng)
安全焦點(diǎn)
Unix
linuxsir
web3d
web3d
虛擬無(wú)忌
代碼查詢(xún)
codezoo
DocJar
代碼例子
代碼查詢(xún)
管理
世界經(jīng)理人
搜索
最新隨筆
1.?Writely Blog 可以注冊(cè)了
2.?request.getSession() 方法
3.?php-5.1.4 和apache_2.2.2的安裝過(guò)程。
4.?在Eclipse3.2中安裝XDoclet.
5.?Struts 秘籍(CookBook) (轉(zhuǎn))
6.?通過(guò)rome讀取feed,發(fā)現(xiàn)中文出現(xiàn)部分亂碼。。
7.?免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)
8.? 剛剛大廈晃的利害,是不是有些地震呀 -- 北京
9.?通過(guò)js等比擴(kuò)大圖片的比例
最新評(píng)論
1.?re: 免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)
謝謝
--艷
2.?re: 免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)
qtfqwtw
--433333
3.?re: 免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)
ww
--ww
4.?免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)
哈哈
--維也納之殤
5.?免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)
酸酸的房貸首付
--維也納之殤
6.?re: 免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)[未登錄](méi)
啊啊啊啊
--啊啊
7.?re: 免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)
在哪里沒(méi)看到啊哎呀哎呀
--dgasdf
8.?re: 免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)
fv sdfgvweaftwerwerfwefrwefwe
--云海
9.?re: 通過(guò)rome讀取feed,發(fā)現(xiàn)中文出現(xiàn)部分亂碼。。
沒(méi)有解決
--dan-ni-s-wu
10.?re: 免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)[未登錄](méi)
69rtt67
--hhh
閱讀排行榜
1.?免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)(9102)
2.?request.getSession() 方法(7865)
3.?在Eclipse3.2中安裝XDoclet.(3044)
4.?php-5.1.4 和apache_2.2.2的安裝過(guò)程。(2641)
5.?通過(guò)rome讀取feed,發(fā)現(xiàn)中文出現(xiàn)部分亂碼。。(2441)
6.?通過(guò)js等比擴(kuò)大圖片的比例(2074)
7.? 剛剛大廈晃的利害,是不是有些地震呀 -- 北京(874)
8.?Writely Blog 可以注冊(cè)了(472)
評(píng)論排行榜
1.?免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)(19)
2.?通過(guò)rome讀取feed,發(fā)現(xiàn)中文出現(xiàn)部分亂碼。。(7)
3.?php-5.1.4 和apache_2.2.2的安裝過(guò)程。(6)
4.?request.getSession() 方法(3)
5.?通過(guò)js等比擴(kuò)大圖片的比例(3)
request.getSession() 方法
HttpRequest對(duì)象有兩種形式的getSession方法調(diào)用:
一個(gè)是getSession(),
另一個(gè)是getSession(boolean isNew)
這樣的
,前者會(huì)檢測(cè)當(dāng)前時(shí)候有session存在,
如果不存在則創(chuàng)建一個(gè),如果存在就返回當(dāng)前的。
getSession()相當(dāng)于getSession(true),
參數(shù)為true時(shí),若存在會(huì)話(huà)則返回該會(huì)話(huà),否則新建一個(gè)會(huì)話(huà)。
參數(shù)為false時(shí),若存在會(huì)話(huà)則返回該會(huì)話(huà),否則應(yīng)該返回一個(gè)NULL
這是文檔:
getSession ?
? public ? HttpSession ? getSession(boolean ? create)Returns ? the ? current ? HttpSession ? associated ? with ? this ? request ? or, ? if ? if ? there ? is ? no ? current ? session ? and ? create ? is ? true, ? returns ? a ? new ? session. ? ?
? If ? create ? is ? false ? and ? the ? request ? has ? no ? valid ? HttpSession, ? this ? method ? returns ? null. ? ?
? ?
? To ? make ? sure ? the ? session ? is ? properly ? maintained, ? you ? must ? call ? this ? method ? before ? the ? response ? is ? committed. ? If ? the ? container ? is ? using ? cookies ? to ? maintain ? session ? integrity ? and ? is ? asked ? to ? create ? a ? new ? session ? when ? the ? response ? is ? committed, ? an ? IllegalStateException ? is ? thrown. ?
? ?
? Parameters: ?
? true ? - ? to ? create ? a ? new ? session ? for ? this ? request ? if ? necessary; ? false ? to ? return ? null ? if ? there's ? no ? current ? session ?
? Returns: ?
? the ? HttpSession ? associated ? with ? this ? request ? or ? null ? if ? create ? is ? false ? and ? the ? request ? has ? no ? valid ? session ?
感謝
zhouhu的提醒,現(xiàn)在已經(jīng)修正。
Edit By: BorderJ??? 2006.8.18
posted on 2006-07-31 19:46
BorderJ
閱讀(7865)
評(píng)論(3)
編輯
收藏
所屬分類(lèi):
Java
評(píng)論
#
re: request.getSession() 方法
2006-08-18 11:45
zhouhu
getSession()相當(dāng)于getSession(true),
回復(fù)
更多評(píng)論
#
re: request.getSession() 方法
2006-08-18 13:08
BorderJ
謝謝提醒,
現(xiàn)在已經(jīng)更正。
回復(fù)
更多評(píng)論
#
re: request.getSession() 方法
2007-03-19 19:13
小神
ok
回復(fù)
更多評(píng)論
新用戶(hù)注冊(cè)
刷新評(píng)論列表
只有注冊(cè)用戶(hù)
登錄
后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航:
博客園
IT新聞
Chat2DB
C++博客
博問(wèn)
管理
相關(guān)文章:
request.getSession() 方法
通過(guò)rome讀取feed,發(fā)現(xiàn)中文出現(xiàn)部分亂碼。。
免費(fèi)MySQL數(shù)據(jù)庫(kù)申請(qǐng)
通過(guò)js等比擴(kuò)大圖片的比例
Powered by:
BlogJava
Copyright © BorderJ
主站蜘蛛池模板:
益阳市
|
和平县
|
扬中市
|
信丰县
|
土默特右旗
|
三明市
|
霸州市
|
柏乡县
|
繁峙县
|
阜平县
|
璧山县
|
双峰县
|
广元市
|
利辛县
|
江阴市
|
靖州
|
定边县
|
罗平县
|
大洼县
|
常熟市
|
北碚区
|
铜陵市
|
丁青县
|
农安县
|
黑水县
|
赤城县
|
耒阳市
|
万全县
|
平阴县
|
祥云县
|
安徽省
|
泸水县
|
大宁县
|
新巴尔虎左旗
|
尼玛县
|
周至县
|
灵武市
|
大兴区
|
板桥市
|
黄龙县
|
岳阳县
|