问题
I am just new to Sturts 2 Web Application Development. I started with basic hello world Sturt application. Its working fine, but m still wondering that what jar files are needed for what kind of Sturts 2 application, or at least for a basic sturt application.
回答1:
Now that have a working Java web application, lets add the minimal required Struts 2 framework Jar files to our web application's class path. And copy these Jar files from the lib folder of the Struts 2 download to the WEB-INF/lib folder in our web application.
Find and copy to WEB-INF\lib these files (note X.X.X.X.jar refers to the version number):
- commons-fileupload-X.X.X.jar
- commons-io-X.X.X.jar
- commons-logging-X.X.X.jar
- commons-logging-api.X.X.jar
- freemarker-X.X.X.jar
- ognl-X.X.X.jar
- struts2-core-X.X.X.X.jar
- xwork-core-X.X.X.jar
- javassist-3.7.ga.jar (new for Struts versions 2.2.1 and higher)
You can see from the above that the Struts 2 core jar depends on several other artifacts. As we add additional Struts 2 features in future tutorials, we'll need to add additional Struts 2 jar files and other transitive dependencies.
use this link
回答2:
you need to add one more jar file xwork2.jar I think this is important jar.
来源:https://stackoverflow.com/questions/22250153/necessary-jar-files-for-basic-sturts-2-application