在 MyEclipse 中以「Debug」或「Run」模式啟動 Tomcat:
正常啟動時,Console 應顯示:
INFO: Initializing Struts 2.0.11.1
INFO: Loading configuration from struts.xml
INFO: Starting Struts 2.0.11.1
若無錯誤訊息,代表 Struts2 核心已成功載入。
預設啟動較安靜,若需詳細除錯資訊,請加入 Log4j:
struts2-blank-2.0.11.1.war 解壓縮log4j.properties 與 commons-logging*.jarWEB-INF/classes/ 與 WEB-INF/lib/log4j.properties 設定 log4j.rootLogger=DEBUG, stdout
瀏覽器輸入:https://localhost:8080/專案名/ 或具體 Action 路徑
若能看到 Struts2 範例頁面 (如登入、表單提交、國際化示範),代表整合成功。進階功能可參考 struts2-showcase.war 解壓縮後的範例專案。
server.xml 的 Connector port 或關閉衝突程式WEB-INF/lib 是否缺少 struts2-core, xwork, ognl 等核心 Jarsrc/ 根目錄,且專案建輸出至 WEB-INF/classes/