?? helloworldaction.java
字號:
package cn.webwheel.tutorials.helloworld;
import cn.webwheel.Action;
import cn.webwheel.Result;
// 一個Action類,實現Action接口,并且可通過實現cn.webwheel.WebContextAware接口
// 來獲得cn.webwheel.WebContext對象,此對象可獲得當前的環境信息,request、response對象等
public class HelloWorldAction implements Action {
// Action的唯一接口方法,此方法在servlet容器接收到"/HelloWorld"地址請求的時候被調用
// 這個映射已在WebMain類中設置
// 此方法返回一個cn.webwheel.Result接口,此接口在邏輯上負責對結果返回的渲染工作
public Result execute() throws Exception {
// 在服務器控制臺輸出信息
System.out.println("WebWheel at server");
// 返回一個結果
return new HelloWorldResult();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -