Dashboard > XWork > Documentation > XWork Installation
  XWork Log In View a printable version of the current page.  
  XWork Installation
Added by tm_jee, last edited by Don Brown on Jan 03, 2007  (view change)
Labels: 
(None)

XWork2 works best with at least JDK 5 (Tiger), but it also ships with a Java 1.4-compatible jar built using RetroTranslator.

To start using XWork2, it is required to have the folloing in the classpath :-

Using command line

Assuing 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 ant

Assuming 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 maven2

When 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

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators