Struts User's Guide
Quick Links
Home
Table of Contents
Introduction
Model Components
View Components
Controller Components
Resources
Who We Are
Kickstart FAQ
Table of Contents

Here are answers to the usual getting-started questions. For an in-depth, searchable FAQ, visit our friends at JGuru.

Why do we need Struts?

Java technologies give developers a serious boost when creating and maintaining applications to meet the demands of today's public Web sites and enterprise intranets. Struts combines Java Servlets, Java ServerPages, custom tags, and message resources into a unified framework. The end result is a cooperative, synergistic platform, suitable for development teams, independent developers, and everyone in between.

How does Struts work?

Java Servlets are designed to handle requests made by Web browsers. Java ServerPages are designed to create dynamic Web pages that can turn billboard sites into live applications. Struts uses a special Servlet as a switchboard to route requests from Web browsers to the appropriate ServerPage. This makes Web applications much easier to design, create, and maintain.

Is Struts compatible with other Java technologies?

Yes. Struts is committed to supporting industry standards. Our lead developer is a member of JSR052, Sun's Expert group for developing a standard library of custom JSP tags. A primary design criteria is that Struts must be compatible with Sun's J2EE platform for corporate enterprises. In fact, Struts really acts as an integrator of Java technologies, so that they can be used in the "real world".

Who wrote Struts?

Struts was created by Craig R. McClanahan, and donated to the Apache Software Foundation in May 2000. Craig is the primary developer of both Struts and Tomcat 4, the official reference implementation for a Java servlet container. With stable releases of Struts and Tomcat 4 in circulation, Craig is now working as the Implementation Engineer for Sun's new Web Services Pack.

There are now many active committers to the Struts project, working cooperatively from around the globe. Other Java developers are invited to contribute to the project. Struts is an Apache Jakarta project, with the common mission to "provide commercial-quality server solutions based on the Java Platform that are developed in an open and cooperative fashion". All told, 17 individual developers and committers contributed to the Struts 1.0 codebase.

Why is it called Struts?

It's a reference to struts in the architectural sense, a reminder of the nearly invisible pieces that hold up buildings, houses, and bridges.

How is Struts licensed?

Struts is copyrighted software available under a "free-to-use-license" by the Apache Software Foundation. The license appears at the head of every source code file. A reference copy of the license is available here.

Can Struts be used in a commercial product?

Yes. The only requirements you must meet are those listed in the Apache Software Foundation license, which is included at the top of each source file and in the file LICENSE in the top-level directory of the distribution.

In addition, contributions of patches, improved code, new features, or even just requests for features are also welcome.

Where can I get a copy of Struts?

The best place to download Struts is at jakarta.apache.org/struts. The nightly builds are very stable, and recommended as the best place to start today.

How do I install Struts?

To develop applications with Struts, you can usually just add the Struts JAR file to your Java development environment. You can then start using the Struts classes as part of your own application. A blank Struts application is provided, which you can just copy to get a quick-start on your own brainchild.

Since the full source code for Struts is available, we also provide complete instructions for compiling your own Struts JAR from scratch. (This is actually easier that it looks!)

Your Struts application can be usually be deployed using a standard WAR file. In most cases, you simply deposit the WAR file on your application server, and it is installed automatically. If not, step-by-step installation instructions for various servlet containers are available.

When do I need "struts.jar" on my classpath?

When you are compiling an application that uses the Struts classes, you must have the "struts.jar" on the classpath your compiler sees -- it does not have to be on your CLASSPATH environment variable.

Why is that an important distinction? Because if you are using a servlet container on your development machine to test your application, the "struts.jar" must not be on your CLASSPATH environment variable when running the container. (This is because each Web application must also have their own copy of the Struts classes, and the container will become confused if it is on the environment path as well.)

There are several general approaches to this issue:

  • Use ANT for building your projects -- it can easily assemble classpaths for the compiler. (This is how Struts itself is built, along with Tomcat and most other Java-based projects).
  • Use an IDE where you can configure the "class path" used for compilation independent of the CLASSPATH environment variable.
  • Use a shell script that temporarily adds struts.jar to the classpath just for compilation, for example
    javac -classpath /path/to/struts.jar:$CLASSPATH $@
Where can I get help with Struts?

The Struts package comes complete with a users guide to introduce people to the framework and its underlying technologies. Various components also have their own in-depth developers guide, to cover more advanced topics. Comprehesive Javadocs are included along with the full source code. The Strut's mailing list is also very active, and welcomes posts from new users.

There are also many third-party tutorials, articles, and books that cover Struts. See our Resources page for current listings and links. Two very useful resources are the mailing list archives and the Struts Forum at JGuru.

Is commercial support available?

There is no official, commercial support for Struts, though third parties may offer different degrees of support. A list of Struts consultants is available on our Resources page

Are there ISPs that will host my Struts application?

For a listing of some Java and Struts ISPs, visit our Resources page.

What Web sites are already Powered by Struts?

For a listing of some Struts-powered Web sites available to the public, visit our Resources page.

What's the difference between Jakarta Struts and Jakarta Turbine?

See

Why aren't the Struts tags maintained as part of the Jakarta Taglibs project?

Development of both products began about the same time. Leading up to the release of 1.0, it was thought better to continue to develop the taglibs alongside the controller. Now that 1.0 is out, the Java ServerPages Standard Taglib is in active development. Once work on the JSPTL stabilizes, the Struts taglibs will be revisited. Tags which are are not linked directly to the framework may be hosted at Jakarta Taglibs instead.

Where can I report bugs or make feature requests?

You can research and report outstanding fixes and feature requests using Jakarta Bugzilla.

If you are unsure if this is in actual problem, feel free to bring it up on the list first. But to be sure an issue is resolved, always report it to Bugzilla.

Struts also maintains a TODO list outlining features being planned or developed.

How can I contribute to the development of Struts?

Struts is distributed by the Apache Software Foundation. These are the same people who distribute the Apache Web server. Like all ASF projects, Struts is managed as a "meritocracy", where everyone's contribution is welcome. Users can help other users on the mailing lists, report bugs, and request new features. Developers can contribute patches, new code, and documentation. The most active Developers may become Committers, who make the actual decisions about the Strut's codebase.

You can start by joining the Struts User list. If you enjoy participating there, then sign up for the Struts Developer list too. If you find any problems with Struts, or find a missing feature, you can enter a record to our Bugzilla database.

When is the next release coming out?

Here is the truth regarding releases:

Jakarta products are released on the basis of merit, and ~not~ according to a strict timetable. The volunteers devote whatever time they can to working on the product. But all volunteers have real jobs and real lives, that do take precedence. Since Struts does have have paid personnel working on the project, we simply cannot make date-orientated commitments.

All Jakarta products must circulate a public beta before release. If a beta is not in circulation, then it's a good bet that a release is not forthcoming any time soon. Products sometimes go through several betas before final release. So if this is beta 1, then it still may not be released any time soon.

The bottom line is that Jakarta takes releases very seriously. We do not compromise the quality of our software by watching the calendar (and then ship something ready or not). A release is ready when it is ready.

That may sound flip, but it ~is~ the truth. The delivery of production-quality, leading-edge software is not something anyone can prognasticate. If anyone tries, they are lying to you. That, we won't do ;-)

What we ~will~ do is release all of our development software as soon as it is developed. This way you can judge for yourself how quickly the development is proceeding, and whether what is being developed will meet your needs. If you need a feature right now, you can use the nightly build, or roll your own patch. There are no private CVS's or a private development lists. What you see is what we got. If you are following the DEV list, then you know everything the developers know. Really, you do.

How do I unsubscribe from the mailing list?

From the email account used to subscribe to the list, send a blank message to < struts-user-unsubscribe@jakarta.apache.org>.

Next: Introduction to the Users Guide


Copyright (c) 2000-2002, Apache Software Foundation