To install the binary version of Struts, a few things must be in place. First, make sure that there is an installed version of the Java Development Kit, version 1.2 or later. This shouldn't be a problem because WebLogic ships with a JDK, but it's available for download from Sun if you don't have it. Second, an XML parser that's compatible with the Java API for XML (JAXP) version 1.1 or later is required to parse the various XML files. Again, WebLogic includes an XML parser, but if you want to use another one, Apache offers an open source parser named Xerces that works fine. Just remember to add the associated .jar files to the classpath. Third, download the binary version 1.1 or greater of Struts. A source version is also available, but it requires more libraries and must be compiled. This is beyond the scope of this chapter. Table 19.1 shows all the software needed to run Struts.
Now that Struts is downloaded, installation is simple. Unpack the zip file into a temp directory. Then copy the struts.jar, jakarta-oro.jar, jdbc2_0-stdext.jar, and all the common*.jar files to the WEB-INF/lib directory of the application you want to use Struts with. Then copy all the struts*.tld files and all the *.dtd files into the WEB-INF directory. Now make sure that all the JAR files are in the startup classpath of WebLogic. Table 19.2 shows the directory position of the files.
Table 19.2. Struts Application Files Per Directory
struts.jar, jdbc2_0-stdext.jar, commons-*.jar
All the files necessary for Struts are now in the proper place in your Web application. However, before using Struts, certain configuration has to be done.