GoogleAppEngine for java on PHP覚書
-
- 準備
GAEを登録しましょう
GAEを登録したら、アプリケーション名を設定してください。
以下からphpwithjavaをダウンロードします
http://www.webdigi.co.uk/fun/php-appengine/phpwithjava.zip
解凍したディレクトリ内のwar内にphpファイルを作成します。
war\WEB-INF\appengine-web.xml
にアプリケーション名を設定します
htmlが作りたくなったら
war\WEB-INF\appengine-web.xml
内の
<static-files> <exclude path="/*.php" /> </static-files>
を
<static-files> <include path="**.html" /> <exclude path="/*.php" /> </static-files>
にします。
-
- デプロイ
http://code.google.com/intl/ja/appengine/downloads.html
より
Google App Engine SDK for Java
appengine-java-sdk-1.2.0.zip
をダウンロードする。
コマンドプロンプトを立ち上げる
以下コマンドを実行
C:\>"Z:\GAE\appengine-java-sdk-1.2.0\appengine-java-sdk-1.2.0\bin\appcfg.cmd" update Z:\GAE\phpwithjava\phpwithjava\war
初めての場合、googleアカウントのメールアドレスとpasswordを聞かれます。
(2回目以降は聞かれないみたい)
C:\>"Z:\GAE\appengine-java-sdk-1.2.0\appengine-java-sdk-1.2.0\bin\appcfg.cmd" update Z:\GAE\phpwithjava\phpwithjava\war ******************************************************** There is a new version of the SDK available. ----------- Latest SDK: Release: 1.2.2 Timestamp: Sun Jul 12 22:43:56 JST 2009 API versions: [1.0] ----------- Your SDK: Release: 1.2.0 Timestamp: Sat Apr 04 06:53:20 JST 2009 API versions: [1.0] ----------- Please visit http://code.google.com/appengine for the latest SDK. ******************************************************** Reading application configuration data... 2009-08-17 20:06:45.288::INFO: Logging to STDERR via org.mortbay.log.StdErrLog Beginning server interaction for imaiworksapp1... 0% Creating staging directory 5% Scanning for jsp files. 20% Scanning files on local disk. 25% Initiating update. 28% Cloning 2 static files. 31% Cloning 20 application files. 40% Uploading 0 files. 90% Deploying new version. 95% Will check again in 1 seconds 98% Will check again in 2 seconds 99% Closing update: new version is ready to start serving. 99% Uploading index definitions. Update complete. Success. Cleaning up temporary files... C:\>
ってな感じで処理が流れたらデプロイされています。
http://imaiworksapp1.appspot.com/
でアクセスするとページが見れます〜