<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  回復  更多評論
      

    主站蜘蛛池模板: 国产亚洲精品福利在线无卡一| 人人爽人人爽人人片av免费| 99亚洲精品高清一二区| 亚洲精品午夜在线观看| 亚洲日韩中文字幕无码一区| 免费人成网站永久| 一级毛片免费观看不卡视频| 免费看片免费播放| 国产亚洲美日韩AV中文字幕无码成人 | 一边摸一边桶一边脱免费视频| a视频在线免费观看| 欧美大尺寸SUV免费| gogo全球高清大胆亚洲| 亚洲一本综合久久| 美美女高清毛片视频黄的一免费| 四虎影视无码永久免费| 亚洲成A人片在线观看无码不卡| 亚洲一卡一卡二新区无人区| 免费a级毛片无码a∨免费软件 | 国产精品va无码免费麻豆| 久久国产精品亚洲一区二区| 四虎影视永久在线精品免费| 337p日本欧洲亚洲大胆裸体艺术| 午夜精品射精入后重之免费观看| 亚洲春色在线观看| 国产成人久久AV免费| 伊人久久大香线蕉亚洲五月天| 一个人免费日韩不卡视频| 亚洲伦理一二三四| 无码国产精品一区二区免费模式| 亚洲国产成AV人天堂无码| 免费一级做a爰片久久毛片潮喷| 亚洲日本VA午夜在线影院| 亚洲精品国产精品乱码不卞| 综合偷自拍亚洲乱中文字幕| 日韩视频在线精品视频免费观看 | 卡一卡二卡三在线入口免费| 91亚洲国产成人久久精品网址| 国产男女性潮高清免费网站| 大地资源网高清在线观看免费 | 久久久久一级精品亚洲国产成人综合AV区|