BorderJ's Blog

          --- java FreeBsd Web3D open-sources

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            8 隨筆 :: 1 文章 :: 40 評(píng)論 :: 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 閱讀(479) | 評(píng)論 (0)編輯 收藏

          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ì)話,否則新建一個(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 閱讀(7877) | 評(píng)論 (3)編輯 收藏

          ????????? 從各官方網(wǎng)站下了 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 安裝比較簡(jiǎn)單,一路next就可以安裝完成。在你的ie中輸入 http://127.0.0.1/?,看到結(jié)果是

          ?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 這個(gè)文件

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

          DocumentRoot "D:/border/php/www"

          找到 DirectoryIndex index.html index.html.var 在后面加入 index.htm index.php (默認(rèn)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


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

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

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

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

          詳細(xì)的說明可以看說明文檔

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

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

          原因:

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

          解決方法:

          下載 這個(gè)文件?并解壓.共有三個(gè)文件.

          vcredist_x86.exe
          php5apache2.dll

          httpd.exe.manifest

          好,開始

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

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

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

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

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

          ????????? 從各官方網(wǎng)站下了 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 安裝比較簡(jiǎn)單,一路next就可以安裝完成。在你的ie中輸入 http://127.0.0.1/?,看到結(jié)果是

          ?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 這個(gè)文件

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

          DocumentRoot "D:/border/php/www"

          找到 DirectoryIndex index.html index.html.var 在后面加入 index.htm index.php (默認(rèn)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


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

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

          ?

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

          ?

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

          詳細(xì)的說明可以看說明文檔

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

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

          原因:

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

          解決方法:

          下載 這個(gè)文件?并解壓.共有三個(gè)文件.

          ?vcredist_x86.exe
          ?php5apache2.dll

          ?httpd.exe.manifest

          好,開始

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

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

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

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

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


          ?


          ?

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

          ?????? 在Eclipse的web開發(fā)平臺(tái)(WTP)包括了大部分web開發(fā)工具,如: 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? 進(jìn)行配置.

          ???? 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 閱讀(3050) | 評(píng)論 (0)編輯 收藏

          主站蜘蛛池模板: 茂名市| 定远县| 湖口县| 惠州市| 新兴县| 永新县| 治多县| 夏津县| 玉门市| 辉南县| 扶绥县| 秦安县| 原阳县| 乌鲁木齐市| 新邵县| 体育| 西乡县| 隆尧县| 天台县| 井冈山市| 商南县| 西畴县| 临夏市| 图木舒克市| 嘉义县| 襄樊市| 邹城市| 竹溪县| 珲春市| 岳普湖县| 重庆市| 松阳县| 德令哈市| 嘉鱼县| 高安市| 开江县| 仙桃市| 郴州市| 阆中市| 中西区| 荃湾区|