BorderJ's Blog

          --- java FreeBsd Web3D open-sources

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            8 隨筆 :: 1 文章 :: 40 評論 :: 0 Trackbacks

          2006年7月18日 #

          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) | 評論 (0)編輯 收藏

          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 @ 2006-07-31 19:46 BorderJ 閱讀(7863) | 評論 (3)編輯 收藏

          ????????? 從各官方網站下了 php-5.1.4-Win32.zip ,apache_2.2.2-win32-x86-no_ssl.msi ,

          下載地址:
          php-5.1.4-Win32.zip :
          http://cn.php.net/distributions/php-5.1.4-Win32.zip
          apache_2.2.2-win32-x86-no_ssl.msi : http://mirror.vmmatrix.net/apache/httpd/binaries/win32/apache_2.2.2-win32-x86-no_ssl.msi

          我的安裝路徑:
          php :???????D:\border\php
          apache:????D:\border\Apache2.2

          安裝apache 并配置支持PHP:

          1.
          apache 安裝比較簡單,一路next就可以安裝完成。在你的ie中輸入 http://127.0.0.1/?,看到結果是

          ?It works!

          說明apache安裝成功!

          2.配置apache并支持php:
          ?????????把php解壓到D:\border\php,
          找到 php目錄里的 php.ini-dist重命名為 php.ini
          把php目錄加大你的path中。
          配置apache里的httpd.conf

          打開 D:\border\Apache2.2\conf\httpd.conf 這個文件

          找到 DocumentRoot "D:/php/Apache2/htdocs" 將其改為你的WEB目錄,如我的為

          DocumentRoot "D:/border/php/www"

          找到 DirectoryIndex index.html index.html.var 在后面加入 index.htm index.php (默認index.php為首頁文件)

          --------------模塊化安裝PHP----------------------------------------
          找到 #LoadModule ssl_module modules/mod_ssl.so 這行,在此行后加入一行

          LoadModule php5_module "D:/border/php5apache2.dll"

          其中D:/border/php/php5apache2.dll為你php目錄中php5apache2.dll所在的位置

          再找到 AddType application/x-gzip .gz .tgz 這行,在此行后加入一行

          AddType application/x-httpd-php .php

          在后面加上:
          ScriptAlias /php/ "D:/border/php/"
          AddType application/x-httpd-php .php


          (其實:上面兩行紅色的,你可以直接加在httpd.conf文件的最后面也可以的)
          --------------------------------------------------------------------

          此時PHP環境基本已經配置成功
          在WEB根目錄(如我的D:\border\php\www)里建一個名為test.php (提示:用記事本的朋友,請避免文件為test.php.txt) ,的文件內容如下?

          <??echo?phpinfo();??>?

          重新啟動apache服務
          用瀏覽器打開 http://localhost/test.php
          如果可以看到php配置輸出信息就OK了 .

          詳細的說明可以看說明文檔

          注:
          不過在我安裝的過程中還是遇到了些問題:

          提示:
          "Cannot load C:/border/php/php5apache2.dll into server: The specified module could not be found."

          原因:

          ?PHP壓縮包里的php5apache2.dll只適用于apache2.0.*

          解決方法:

          下載 這個文件?并解壓.共有三個文件.

          vcredist_x86.exe
          php5apache2.dll

          httpd.exe.manifest

          好,開始

          1.將 php5apache2.dll 覆蓋掉你原來PHP目錄下的 php5apache2.dll 文件.

          2.將 httpd.exe.manifest 文件復制到你的apache安裝目錄下的bin文件夾下.

          3.雙擊運行vcredist_x86.exe安裝.(如果您的系統里已安裝了 .NET framework 2.就可以省掉這一步)

          完成!去重啟你的apache2.2試試吧.

          參考:
          ?esayr??:apache 2.2.2 + PHP5.1.4 不能運行的解決辦法.??

          ????????? 從各官方網站下了 php-5.1.4-Win32.zip ,apache_2.2.2-win32-x86-no_ssl.msi ,

          下載地址:
          php-5.1.4-Win32.zip :
          http://cn.php.net/distributions/php-5.1.4-Win32.zip
          apache_2.2.2-win32-x86-no_ssl.msi : http://mirror.vmmatrix.net/apache/httpd/binaries/win32/apache_2.2.2-win32-x86-no_ssl.msi

          我的安裝路徑:
          php :???????D:\border\php
          apache:????D:\border\Apache2.2

          安裝apache 并配置支持PHP:

          1.
          apache 安裝比較簡單,一路next就可以安裝完成。在你的ie中輸入 http://127.0.0.1/?,看到結果是

          ?It works!

          說明apache安裝成功!

          2.配置apache并支持php:
          ?????????把php解壓到D:\border\php,
          找到 php目錄里的 php.ini-dist重命名為 php.ini
          把php目錄加大你的path中。
          配置apache里的httpd.conf

          打開 D:\border\Apache2.2\conf\httpd.conf 這個文件

          找到 DocumentRoot "D:/php/Apache2/htdocs" 將其改為你的WEB目錄,如我的為

          DocumentRoot "D:/border/php/www"

          找到 DirectoryIndex index.html index.html.var 在后面加入 index.htm index.php (默認index.php為首頁文件)

          --------------模塊化安裝PHP----------------------------------------
          找到 #LoadModule ssl_module modules/mod_ssl.so 這行,在此行后加入一行

          LoadModule php5_module "D:/border/php/php5apache2.dll"

          其中D:/border/php/php5apache2.dll為你php目錄中php5apache2.dll所在的位置

          再找到 AddType application/x-gzip .gz .tgz 這行,在此行后加入一行

          AddType application/x-httpd-php .php

          在后面加上:
          ScriptAlias /php/ "D:/border/php/php/"
          AddType application/x-httpd-php .php


          (其實:上面兩行紅色的,你可以直接加在httpd.conf文件的最后面也可以的)
          --------------------------------------------------------------------

          此時PHP環境基本已經配置成功
          在WEB根目錄(如我的D:\border\php\www)里建一個名為test.php (提示:用記事本的朋友,請避免文件為test.php.txt) ,的文件內容如下?

          ?

          <??echo?phpinfo();??>?

          ?

          重新啟動apache服務
          用瀏覽器打開 http://localhost/test.php
          如果可以看到php配置輸出信息就OK了 .

          詳細的說明可以看說明文檔

          注:
          不過在我安裝的過程中還是遇到了些問題:

          提示:
          "Cannot load C:/php/php5apache2.dll into server: The specified module could not be found."

          原因:

          ?PHP壓縮包里的php5apache2.dll只適用于apache2.0.*

          解決方法:

          下載 這個文件?并解壓.共有三個文件.

          ?vcredist_x86.exe
          ?php5apache2.dll

          ?httpd.exe.manifest

          好,開始

          1.將 php5apache2.dll 覆蓋掉你原來PHP目錄下的 php5apache2.dll 文件.

          2.將 httpd.exe.manifest 文件復制到你的apache安裝目錄下的bin文件夾下.

          3.雙擊運行vcredist_x86.exe安裝.(如果您的系統里已安裝了 .NET framework 2.就可以省掉這一步)

          完成!去重啟你的apache2.2試試吧.

          參考:
          ?esayr??:apache 2.2.2 + PHP5.1.4 不能運行的解決辦法.??
          ?php手冊
          ?windows 2000/XP/2003下安裝APACHE2.0.53、PHP5.0.3、MYSQL4.1.10a、PHPMYADMIN2..6.1


          ?


          ?

          posted @ 2006-07-20 18:22 BorderJ 閱讀(2641) | 評論 (6)編輯 收藏

          ?????? 在Eclipse的web開發平臺(WTP)包括了大部分web開發工具,如: source editors for HTML, Javascript, CSS, JSP, SQL, XML, DTD, XSD, and WSDL; graphical editors for XSD and WSDL; J2EE project natures, builders, and models and a J2EE navigator; a Web service wizard and explorer, and WS-I Test Tools; and database access and query tools and models.?? 也支持XDoclet, 不過自己要先下載 XDoclet . 然后在Window > Preferences > XDoclet? 進行配置.

          ???? WTP : http://www.eclipse.org/webtools/
          ???? XDoclet . http://xdoclet.sourceforge.net/xdoclet/index.html


          To use XDoclet annotation support, or to create enterprise beans, XDoclet must be installed on your system and configured to work with the workbench.

          Download and install XDoclet from http://xdoclet.sourceforge.net/xdoclet/index.html
          To configure XDoclet to work with the workbench:

          1.Click Window > Preferences > XDoclet to open the XDoclet Runtime Preferences page.
          2.Check the Enable XDoclet Builder check box to turn on annotation-based artifact creation.
          3.Use the Browse button to locate the installation directory for XDoclet (XDoclet Home).
          4.Select the Version of XDoclet that you have installed. Supported versions include 1.2.1, 1.2.2, 1.2.3.
          5.Click OK to save the preferences.

          posted @ 2006-07-18 17:52 BorderJ 閱讀(3043) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 邢台县| 太仆寺旗| 武乡县| 新平| 尤溪县| 北海市| 准格尔旗| 福清市| 内乡县| 濮阳县| 溆浦县| 鹤峰县| 洪雅县| 阜阳市| 崇文区| 绥阳县| 叙永县| 大城县| 都兰县| 洪泽县| 聂拉木县| 临颍县| 香港| 会同县| 泰安市| 泽普县| 鄂托克前旗| 英德市| 万盛区| 赤峰市| 泰安市| 新建县| 合肥市| 蕲春县| 绥宁县| 遂川县| 开化县| 绥芬河市| 淮南市| 利辛县| 肃北|