2011-04-22 31 views
0

我是struts初學者。我使用了幾個示例hello world應用程序。首先我執行了hello world的struts 2.0.1示例,然後我下載了最新的庫並試圖創建struts應用程序。但它無法部署。我下載的版本是2.2。然後我不得不改變這些庫。而不是2.0.1中使用的commons-logging,我不得不使用commons-io commons-file-upload javaasist。然後只有我可以運行它。但所有其他代碼都是相同的。爲什麼這樣?我在哪裏可以得到有關這方面的細節。是否有任何鏈接或參考,我可以知道在所有應用程序中使用的核心庫?Struts初學者庫

回答

0

我推薦使用Maven和其中一個struts 2 maven archetypes來啓動一個項目。例如,在安裝Maven:

mvn archetype:generate -B \ 
        -DgroupId=your.group.id \ 
        -DartifactId=your.app.name \ 
        -DarchetypeGroupId=org.apache.struts \ 
        -DarchetypeArtifactId=struts2-archetype-convention \ 
        -DarchetypeVersion=2.2.1 

將創建一個簡單的Struts 2的項目爲您啓用了conventions plugin

您還可以找到核心的依賴關係列表在這裏:在開發級

http://struts.apache.org/2.2.1/struts2-core/dependencies.html

+0

一些簡單的選擇... – 2011-04-22 07:13:45