---------------
1. 擁有 Google Application Engine 帳號
2. 擁有 Eclipse 及 GAE SDK 開發工具
參考文章 : http://www.restlet.org/documentation/2.0/firstSteps
下載 Restlet 2.0 套件
------------------------------
1. 下載網址
http://www.restlet.org/downloads/testing
2. 請選擇 "Edition for Google Application" 項目中的 "Zip archive"
建立 GAE 專案
--------------------
1. 啟動 Eclipse
2. 點選 [File][New][Web Application Project], 如下圖 :

2. 輸入專案名稱及套件名稱, 如下圖 :

加入 Restlet 套件
-------------------------
1. 將 org.restlet.jar, org.restlet.ext.servlet.jar 這二個套件, 加入 GAE 專案的 Lib, 如下圖 :

2. 選取 org.restlet.jar, org.restlet.ext.servlet.jar 這二個套件

建立 Restlet 套件的 Build Path
--------------------------------------------
1. 點選 Restlet 套件, 然後選擇 [Build Path][Add to Build Path]

撰寫程式
-----------------
1. 請在 firstSteps 套件中, 撰寫你的第一個 Restlet 應用程式, 程式如下 :

2. 撰寫 Restlet 啟動程式, 程式如下 :

修改 GAE 專案設定檔 (web.xml)
---------------------------------------------------

設定 GAE Application ID
-------------------------------------
1. 修改 WEB-INF/appengine-web.xml, 如下圖 :

上載 GAE 專案
-------------------------

測試專案
------------------
1. 啟動瀏覽器輸入以下網址
http://gotw2010.appspot.com/hello
2. 顯示執行結果

0 意見: