Recipe1.1.Downloading Struts


Recipe 1.1. Downloading Struts

Problem

You want to start developing applications using Struts.

Solution

Download the Struts binary and source distributions from http://struts.apache.org/acquiring.html and deploy the example applications to your web container.

Discussion

A common question among developers new to Struts is which release to use. Without question, any new Struts project should use the latest best available release. At the time this was written, Struts 1.2.4 (referred to in this book as Struts 1.2) had just gone GA (General Availability).

For developers looking to gain experience with the latest and greatest Struts features, the Struts Nightly Build will provide a peek into Struts 1.3.


You will find it useful to have the binary and source distributions available. The binary distribution includes the Struts JARs and associated dependent JARs. The source distribution, on the other hand, contains the source code for the Struts framework itself, as well as the Java source for the Struts tag libraries. Just as important, the source distribution contains the Java source, deployment descriptors, HTML pages, and JSP pages for all of the supplied sample applications.

The exact content of these distributions varies depending on whether you are getting the latest Release Build or the Struts Nightly Build.


The Struts 1.2 Release Build binary distribution includes a basic README file, an installation document, and release notes. The lib folder contains the Struts JAR file, as well as the dependent JAR files from the Jakarta Commons project. The contrib folder contains contributions to the Struts distribution that aren't considered part of the Struts core. In particular, this folder contains the JAR files and sample web applications for Struts-EL. Struts-EL allows you to use JSTL (JSP Standard Tag Library) style expression language in the Struts tags. It includes, by necessity, the JSTL tag libraries.

The Struts 1.2 Release Build source distribution contains the source code for the Struts framework, and the source and web resources for the sample applications. In addition, the contrib folder contains the source code for contributions made by the Struts community that are not, but may later become, part of the Struts core. Some contributions of particular interest include the following:


Struts-EL

JSTL Expression language support for Struts tags


Struts-Faces

A framework layer that supports integration between Struts application and Java Server Faces technology.


Scaffold

A set of base and helper classes that assist in integrating your data layer (Model) with Struts.

Once you have downloaded the source and binary distributions, you will want to deploy the example applications included with Struts, as described in Recipe 1.2.

See Also

Recipe 1.2 describes how to deploy the Struts example applications included in the Struts distribution.

If you are completely new to Struts, you will want to first check out Programming Jakarta Struts by Chuck Cavaness (O'Reilly). Additional resources can be directly from the Struts home page at http://struts.apache.org.



    Jakarta Struts Cookbook
    Jakarta Struts Cookbook
    ISBN: 059600771X
    EAN: 2147483647
    Year: 2005
    Pages: 200

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net