I am beginner to struts. I used few sample hello world applications. First of all I executed hello world example of struts 2.0.1 then I downloaded latest libraries and tried to create struts app. But it couldn't be deployed. My downloaded version was 2.2. Then I had to change the libraries a bit. Instead of commons-logging used in 2.0.1 I 开发者_Go百科had to use commons-io commons-file-upload javaasist. Then only i could run it. However all other codes were same. Why is it so? Where could i get the details regarding this. Is there any link or reference by which i can know the core libraries to be used in all applications?
I'd recommend using Maven and one of the struts 2 maven archetypes to start a project. For example, after installing 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
will create a sample struts 2 project for you with the conventions plugin enabled.
You can also find a list of core dependencies here:
http://struts.apache.org/2.2.1/struts2-core/dependencies.html
精彩评论