跳至內容
bestlong.Wiki
用戶工具
登入
網站工具
工具
顯示頁面
舊版
反向連結
最近更新
多媒體管理器
站台地圖
登入
最近更新
多媒體管理器
站台地圖
足跡:
eclipse_struts2
本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得這是誤判,請詢問管理員。
====== 在 Eclipse 使用 Struts 2.2.x ====== 請下載 struts-2.2.x.x-all.zip 檔案,一般來說是解壓縮後直接使用 lib/ 內的,不過實際上卻缺少 javassist-3.7.ga.jar 檔案,可以在 apps/struts2-blank.war 範例檔的 WEB-INF/lib/ 內找就有了。 所以最快速讓專案加入 struts 2.2 的框架就可以只拷貝 struts2-blank.war 解壓縮後在 WEB-INF/lib/ 下的所有 JAR 檔案,放到 Eclipse 專案下的 WebContent/WEB-INF/lib/ 目錄。 然後修改 WebContent/WEB-INF/web.xml 增加: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>struts2211demo</display-name> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> 最後在 src/ 增加 struts.xml 設定就可以開始探索了。
eclipse_struts2.txt · 上一次變更: 2011/04/01 11:06 由 bestlong
頁面工具
顯示頁面
舊版
反向連結
回到頁頂