Easy Struts 是 SourceForge 上的開源專案(當時最新版 0.64),作為 Eclipse 外掛簡化 Struts 開發流程。本文詳細說明安裝設定、專案建立與開發實作步驟。
org.easystruts.eclipse_0.6.4.zip,解壓至 {ECLIPSE}/plugins 目錄,應出現 com.cross.easystruts.eclipse_[ver] 子目錄struts.jarstruts_html.tld、struts_bean.tld、struts_logic.tldStrutsDemo)struts_demo,打包為 WAR 時使用)test.struts).easystrutsplugin 設定檔WEB-INF/ 及 TLD 檔案ApplicationResources.properties 國際化資源檔(支援多語言,如 _zh_CN 後綴)web.xml 已預設定義 ActionServlet 入口與參數struts.jar 複製至 WEB-INF/lib/專案建置路徑需加入 struts.jar 與 servlet.jar,預設輸出資料夾設為 \struts_demo\WEB-INF\classes。
Easy Struts 在 New 對話框提供多種 Struts 專用向導:
UserLogin),自動更新 Path 與 Typestruts-config.xml,預設為主設定檔XxxAction.java 並更新 struts-config.xml雙擊 struts-config.xml 開啟圖形化編輯器,可透過拖拉與連線方式設定 Action Mapping、Forward、Form Bean 等,大幅降低 XML 手寫錯誤。
Easy Struts 雖屬開發中版本,但已展現強大功能與易用性。結合 Eclipse 視覺化編輯與程式碼產生,讓 Struts 開發變得直觀高效。本文涵蓋從安裝到實際開發的核心流程,更多進階功能待開發者自行探索。