<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    BorderJ's Blog

    --- java FreeBsd Web3D open-sources

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      8 隨筆 :: 1 文章 :: 40 評論 :: 0 Trackbacks
    HttpRequest對象有兩種形式的getSession方法調用:
    一個是getSession(),
    另一個是getSession(boolean isNew)

    這樣的,前者會檢測當前時候有session存在,如果不存在則創建一個,如果存在就返回當前的。
    getSession()相當于getSession(true),

    參數為true時,若存在會話則返回該會話,否則新建一個會話。
    參數為false時,若存在會話則返回該會話,否則應該返回一個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的提醒,現在已經修正。
    Edit By: BorderJ??? 2006.8.18


    posted on 2006-07-31 19:46 BorderJ 閱讀(7877) 評論(3)  編輯  收藏 所屬分類: Java

    評論

    # re: request.getSession() 方法 2006-08-18 11:45 zhouhu
    getSession()相當于getSession(true),  回復  更多評論
      

    # re: request.getSession() 方法 2006-08-18 13:08 BorderJ

    謝謝提醒,

    現在已經更正。  回復  更多評論
      

    # re: request.getSession() 方法 2007-03-19 19:13 小神
    ok  回復  更多評論
      

    主站蜘蛛池模板: 黄人成a动漫片免费网站| 青青草原1769久久免费播放| 亚洲高清视频免费| 免费jjzz在在线播放国产| 99久久精品国产亚洲| jizz免费在线观看| 国外成人免费高清激情视频| 亚洲卡一卡2卡三卡4卡无卡三| 成年网在线观看免费观看网址 | 羞羞视频免费网站在线看| 大地资源免费更新在线播放| 亚洲av色影在线| 成年网在线观看免费观看网址| 女人被男人桶得好爽免费视频| 亚洲影院在线观看| 国产在线精品一区免费香蕉 | 免费又黄又硬又爽大片| 亚洲伦理中文字幕| 国产一级婬片A视频免费观看| 免费在线观看黄色毛片| 亚洲综合激情五月丁香六月| 99re在线这里只有精品免费| 国内精品99亚洲免费高清| 国产亚洲女在线线精品| 在线观看无码的免费网站| 亚洲激情黄色小说| 久久精品免费电影| 国产亚洲精品a在线观看app| 一本到卡二卡三卡免费高| 国产婷婷高清在线观看免费| 亚洲中文字幕无码久久| 99久久久精品免费观看国产 | 99视频在线精品免费| 亚洲va无码va在线va天堂| 国产免费播放一区二区| 亚洲国产精品视频| 男女超爽视频免费播放| 国产免费私拍一区二区三区| 亚洲第一第二第三第四第五第六| 手机在线看永久av片免费| 亚洲国产成AV人天堂无码|