To start using XWork2, it is required to have the folloing in the classpath :-
Using command lineAssuing the following structure. + classes/ + xwork2-xxx.jar + xwork.xml + otherJars.jar + myPackage/ + MyMain.class // Linux / Unix like environment java -cp xwork-xxx.jar:xwork.xml:otherJars.jar myPackage.MyMain // Windows java -cp xwork-xxx.jar;xwork.xml;ohterJars.jar myPackage.MyMain Using antAssuming the following structure + src + myPackage + MyMain.java + lib + xwork2-xxx.jar + ... jar + classes + myPackage + MyMain.class + resources + xwork.xml <procject ... > ... <path id="classpath"> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> <pathelement location="resources"/> </path> .... <target ...> <!-- your target refer to path with id as 'classpath' when necessary --> </target> Using maven2When using maven2, one might want to have the following dependencies <pom ...> .... <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.4</version> </dependency> <dependency> .... other dependencies </dependency> ..... </pom> Next: XWork Requirements And Dependencies |