BorderJ's Blog

          --- java FreeBsd Web3D open-sources

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            8 隨筆 :: 1 文章 :: 40 評(píng)論 :: 0 Trackbacks

          2006年7月31日 #

          Writely Blog is proud to announce that Writely access is now free for everyone. Just sign up for an account.

          Writely is a word processing tool acquired by Google this year. Since it was acquired, users were required to have an invitation to try the product. You can read my negative review, but there are many people who like Writely.
          posted @ 2006-08-18 09:53 BorderJ 閱讀(472) | 評(píng)論 (0)編輯 收藏

          HttpRequest對(duì)象有兩種形式的getSession方法調(diào)用:
          一個(gè)是getSession(),
          另一個(gè)是getSession(boolean isNew)

          這樣的,前者會(huì)檢測當(dāng)前時(shí)候有session存在,如果不存在則創(chuàng)建一個(gè),如果存在就返回當(dāng)前的。
          getSession()相當(dāng)于getSession(true),

          參數(shù)為true時(shí),若存在會(huì)話則返回該會(huì)話,否則新建一個(gè)會(huì)話。
          參數(shù)為false時(shí),若存在會(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 @ 2006-07-31 19:46 BorderJ 閱讀(7863) | 評(píng)論 (3)編輯 收藏

          主站蜘蛛池模板: 农安县| 满洲里市| 凌源市| 无极县| 壤塘县| 克拉玛依市| 博乐市| 乳源| 石河子市| 澄城县| 什邡市| 阿城市| 清水河县| 文安县| 大渡口区| 浦东新区| 浑源县| 黑水县| 高碑店市| 都江堰市| 濉溪县| 永平县| 新沂市| 花垣县| 易门县| 石家庄市| 枣庄市| 广宁县| 且末县| 沽源县| 富锦市| 东港市| 余江县| 荥阳市| 铁力市| 馆陶县| 遵义县| 永州市| 龙江县| 元朗区| 张家界市|