<?xml version="1.0"?>
<document url="./kickstart.xml">
<properties>
<author>Ted Husted</author>
<author>Craig R. McClanahan</author>
<author>James DeVries</author>
<author>James Holmes</author>
<title>Kickstart FAQ - Apache Struts</title>
</properties>
<body>
<section href="faq" name="Kickstart FAQ"/>

<section href="contents" name="Index">

<p>
Here are answers to the usual getting-started questions. <strong>For an in-depth, searchable FAQ, visit our friends at <a href="http://www.jguru.com/faq/home.jsp?topic=Struts">JGuru</a>.</strong>
</p>

  <ul>
    <li><a href="#why">Why do we need Struts?</a></li>
    <li><a href="#how">How does Struts work?</a></li>
    <li><a href="#compat">Is Struts compatible with other Java technologies?</a></li>
    <li><a href="#who">Who wrote Struts?</a></li>
    <li><a href="#struts">Why is it called Struts?</a></li>
    <li><a href="#license">How is Struts licensed?</a></li>
    <li><a href="#usage">Can Struts be used in a commercial application?</a></li>
    <li><a href="#credits">Do I have to credit Struts on my own website?</a></li>
  </ul><ul>
    <li><a href="#where">Where can I get a copy of Struts?</a></li>
    <li><a href="#install">How do I install Struts?</a></li>
    <li><a href="#jar">When do I need the struts.jar on my classpath?</a></li>
    <li><a href="#tests">Does Struts provide its own unit tests?</a></li>
  </ul><ul>
    <li><a href="#requests">If the framework doesn't do what I want, can I request that a feature be added?</a></li>
    <li><a href="#help">Where can I get help with Struts?</a></li>
    <li><a href="#support">Is commercial support available for Struts?</a></li>
    <li><a href="#providers">Are there ISPs that will host my Struts application?</a></li>
    <li><a href="#powered">What Web sites are already Powered by Struts?</a></li>
  </ul><ul>
    <li><a href="#turbine">What's the difference between Struts and Turbine?  What's the difference between Struts and Expresso?</a></li>
    <li><a href="#taglibs">Why aren't the Struts tags maintained as part of the Jakarta Taglibs project?</a></li>
    <li><a href="#xhtml">Are the Struts tags XHTML compliant?</a></li>
    <li><a href="#jsf">What about JSTL and JavaServer Faces?</a></li>
    <li><a href="#ide">Is there a particularly good IDE to use with Struts?</a></li>
 </ul><ul>
    <li><a href="#digest">Is there a digest for the mailing list?</a></li>
    <li><a href="#newsgroup">Is there a Struts Newsgroup?</a></li>
    <li><a href="#mailbounce">Why didn't my posting show up on the user list?"</a></li>
    <li><a href="#unsubscribe">How do I unsubscribe from the mailing list?</a></li>
  </ul>    
</section>

<section href="why" name="Why do we need Struts?">
<p>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.</p>
</section>

<section href="how" name="How does Struts work?">
<p>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.</p>
</section>

<section href="compat" name="Is Struts compatible with other Java technologies?">
<p>Yes. Struts is committed to supporting industry standards. Our lead developer is a member of <a href="http://java.sun.com/aboutJava/communityprocess/jsr/jsr_052_jsptaglib.html">JSR052</a>, 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 &quot;real world&quot;.</p>
</section>

<section href="who" name="Who wrote Struts?">
<p>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 <a href="http://jakarta.apache.org/tomcat/index.html">Tomcat 4</a>, the basis for the official reference implementation for a servlet 2.3 and JSP 1.2 container. With stable releases of Struts and Tomcat 4 in circulation, Craig is now the Specification Lead for <a href="http://jcp.org/jsr/detail/127.jsp">JavaServer Faces (JSR-127)</a>, and is the Web Layer Architect for the Java2 Enterprise Edition (J2EE) platform as a whole.</p>
<p>There are now many active committers to the Struts project, working cooperatively from around the globe. Other Java developers are invited to <a href="helping.html#contribute">contribute to the project</a>. Struts is an <a href="http://jakarta.apache.org/">Apache Jakarta</a>  project, with the common mission to &quot;provide commercial-quality server solutions based on the Java Platform that are developed in an open and cooperative fashion&quot;. All told, 17 individual developers and committers contributed to the Struts 1.0 codebase.</p>
</section>

<section href="struts" name="Why is it called Struts?">
<p>It's a reference to struts in the architectural sense, a reminder of the nearly invisible pieces that hold up buildings, houses, and bridges.</p>
</section>

<section href="license" name="How is Struts licensed?">
<p>Struts is copyrighted software available under a &quot;free-to-use-license&quot; by The Apache Software Foundation. The license appears at the head of every source code file. A reference copy of the license is available <a href="http://www.apache.org/LICENSE-1.1">here</a>.</p>
</section>

<section href="usage" name="Can Struts be used in a commercial product?">
<p>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.</p>
<p>In addition, <a href="helping.html#bugs">contributions of patches, improved code, new features,</a> or even just requests for features are also welcome.</p>
</section>

<section href="credits" name="Do I have to credit Struts on my own website?">
<p>You need to credit Struts if you <strong>redistribute your own framework</strong> based on Struts
for other people to use. (See the <a href="http://www.apache.org/LICENSE">Apache License</a> for details.)
But you do <strong>not</strong> need to credit Struts just because your web application utilizes the framework.
It's the same situation as using the Apache HTTPD server or Tomcat. Not required if its just running your web site.
Required if you've used the source code to create your own server that you are redistributing to other people.</p>
</section>

<section href="where" name="Where can I get a copy of Struts?">
<p>The best place to download Struts is at <a href="http://jakarta.apache.org/struts/">jakarta.apache.org/struts</a>. The nightly builds are very stable, and recommended as the best place to start today.</p>
</section>

<section href="install" name="How do I install Struts?">
<p>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 (in the
<code>webapps</code> directory, open <code>struts-blank.war</code>)
is provided, which you can just copy to get a quick-start on your own brainchild.</p>
<p>Since the full source code for Struts is available, we also provide
<a href="../userGuide/installation.html">complete instructions</a>
for compiling your own Struts JAR from scratch. (This is actually easier than it looks!)</p>
<p>Your Struts application can 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
<a href="../userGuide/installation.html#Containers">various servlet
containers</a> are available.</p>
</section>

<section href="jar" name="When do I need &quot;struts.jar&quot; on my classpath?">
<p>When you are compiling an application that uses the Struts classes, you must have the &quot;struts.jar&quot; on the classpath your <strong>compiler</strong> sees -- it does not <em> have</em> to be on your CLASSPATH environment variable.</p>
<p>Why is that an important distinction? Because if you are using a servlet container on your development machine to test your application, the &quot;struts.jar&quot; <strong>must not</strong> 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.)</p>
<p>There are several general approaches to this issue:</p>
<ul>
<li><strong>Use ANT</strong> 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).</li>
<li><strong>Use an IDE</strong> where you can configure the "class path" used  for compilation independent of the CLASSPATH environment  variable.</li>
<li><strong>Use a shell script</strong> that temporarily adds struts.jar  to the classpath just for compilation, for example<br/>
<em>javac -classpath /path/to/struts.jar:$CLASSPATH $@</em></li>
</ul>
</section>

<section href="tests" name="Does Struts include its own unit tests?">
<p>
Struts currently has two testing environments, to reflect the fact that
some things can be tested statically, and some really need to be done in
the environment of a running servlet container.</p>
<p>
For static unit tests, we use the <a href="http://www.junit.org">JUnit framework</a>.
The sources for these tests are in the "src/test"
hierarchy in the Subversion repository, and are executed via the "test.junit"
target in the top-level build.xml file.  Such tests are focused on the
low-level functionality of individual methods, are particularly
suitable for the static methods in the org.apache.struts.util utility
classes.  In the test hierarchy, there are also some "mock object" classes
(in the org.apache.struts.mock package) so that you can package up things
that look like servlet API and Struts API objects to pass in as arguments
to such tests.</p>
<p>
Another valuable tool is
<a href="http://sourceforge.net/projects/strutstestcase/">Struts TestCase</a>
which provides a useful harness for Action classes that can be used with JUnit or
<a href="http://jakarta.apache.org/cactus">Cactus</a>.
</p>
</section>

<section href="requests" name="If the framework doesn't do what I want, can I request that a feature be added?">
<p>
First, it's important to remember that Struts is an all-volunteer project.
We don't charge anyone anything to use Struts.
Committers and other developers work on Struts because they need to use it with their own applications.
If others can use it too, that's "icing on the cake".
If you submit a patch for a feature that a Committer finds useful, then that Committer may choose to volunteer his or her time to apply the patch.
If you just submit an idea without a patch, it is much less likely to be added (since first someone else has to volunteer their time to write the patch).
</p>
<p>
We are grateful for any patches, and we welcome new ideas, but the best way to see that something gets added to the framework is to do as much of the work as you can, rather than rely on the "kindness of strangers". Worst case, you can apply the patch to your copy of Struts and still use the feature in your own application. (Which is what open source is ~really~ all about.)
</p>
</section>

<section href="help" name="Where can I get help with Struts?">
<p>The Struts package comes complete with a
<a href="../userGuide/index.html">Users Guide</a> 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. Comprehensive
<a href="../api/index.html">Javadocs</a> are included
along with the <strong>full source code</strong>. For your convenience, these are bundled together as
a self-installing application. The <code>struts-documentation.war</code> is the same
bundle that is deployed as the
<a href="http://jakarta.apache.org/struts/">Struts Web site</a>.
</p>
<p>
The
<a href="http://jakarta.apache.org/site/mail.html">Strut's mailing list</a> is also
very active, and welcomes posts from new users. Before posting a new question, be
sure to consult the
<a href="http://www.mail-archive.com/struts-user%40jakarta.apache.org/">
<strong>MAILING LIST ARCHIVE</strong></a> and the very excellent
<a href="http://www.tuxedo.org/~esr/faqs/smart-questions.html">
How To Ask Questions The Smart Way</a> by Eric Raymond. Please do be sure
to <a href="http://expita.com/nomime.html">turn off HTML</a> in your
email client before posting.
</p>
</section>

<section href="support" name="Is commercial support available?">
<p>There is no official, commercial support for Struts, though third parties may offer different degrees of support. </p>
</section>

<section href="providers" name="Are there ISPs that will host my Struts application?">
<p>For a listing of some Java and Struts ISPs, visit the <a href="http://struts.sf.net/commnity/index.html">Struts Community Resources</a> area on SourceForge.</p>
</section>

<section href="turbine" name="What's the difference between Struts and Turbine? What's the difference between Struts and Expresso?">
<p>
If you are starting from scratch, packages like
<a href="http://jakarta.apache.org/turbine">Turbine</a> and
<a href="http://jcorporate.com">Expresso</a>
can be very helpful since they try to provide all of the basic services that your team is likely to need.
Such services include things like data persistence and logging.
</p>
<p>
If you are not starting from scratch, and need to hook up your web application to an existing infrastructure, then "plain vanilla" Struts can be a better choice.
The core Struts framework does not presuppose that you are using a given set of data persistence, presentation, or logging tools.
Anything goes =:0)
</p>
<p>
Compared to other offerings, Struts endeavors to be a minimalist framework.
We try leverage existing technologies whenever we can and provide only the missing pieces you need to combine disparate technologies into a coherent application.
This is great when you want to select your own tools to use with Struts.
But, if you prefer a more integrated infrastructure, then packages like Turbine or Expresso (which uses Struts) are perfectly good ways to go.
</p>
<p>See also</p>
<ul>
<li>&lt; <a href="http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03206.html">http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03206.html</a> &gt;</li>
<li>&lt; <a href="http://www.mail-archive.com/general@jakarta.apache.org/msg00495.html">http://www.mail-archive.com/general@jakarta.apache.org/msg00495.html</a> &gt;</li>
<li>&lt; <a href="http://jakarta.apache.org/velocity/ymtd/ymtd.html">http://jakarta.apache.org/velocity/ymtd/ymtd.html</a> &gt;</li>
</ul>
</section>

<section href="taglibs" name="Why aren't the Struts tags maintained as part of the Jakarta Taglibs project?">
<p>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 JavaServer Pages Standard Taglib is in active development. Once work on JSTL stabilizes, the Struts taglibs will be revisited. Tags which are not linked directly to the framework may be hosted at Jakarta Taglibs instead.</p>
</section>

<section href="xhtml" name="Are the Struts tags XHTML compliant?">
<p>If you use an &lt;html:html xhtml="true&gt; or &lt;html:xhtml/&gt; element on your page, the tags
will render as XHTML (since Struts 1.1). </p>
</section>

<section href="wml" name="Will the Struts tags support other markup languages such as WML">
<p>
Struts itself is markup neutral. The original Struts taglibs are only one example of how
presentation layer components can access the framework. The framework objects are exposed
through the standard application, session, and request contexts, where any Java component in
the application can make use of them.
</p>

<p>Markup extensions that use Struts are available for
<a href="http://jakarta.apache.org/velocity">Velocity</a> and
<a href="http://www.openroad.ca/opencode/">XLST</a>, among others.
A new Struts tag library for
<a href="#jsf">Java Server Faces</a> is also in development.
</p>

<p>For more about using WAP/WML with Struts see the article
<a href="http://www.sys-con.com/pbdj/archives2/0904/hamboeck/">
WAP up your EAserver</a>.
</p>
</section>

<section href="jsf" name="What about JSTL and JavaServer Faces?">
    <p>
       JSTL, the <a href="http://java.sun.com/products/jsp/jstl/">
       JavaServer Standard Tag Library</a>, is a set of JSP tags that
       are designed to make it easier to develop Web applications.
       <a href="http://java.sun.com/j2ee/javaserverfaces/">JavaServer Faces</a>
       (JSF) is a specification for a new technology that promises to make
       it easier to write MVC applications, both for the Web and for the
       desktop.
    </p>
<p>
The inventor of Struts, Craig McClanahan, was a member of the
expert group for the JavaServer Standard Tag Library (JSR 052) and
is now the specification co-lead for JavaServer Faces (JSR 127). Both
technologies are complementary to Struts.</p>
<p>
The mainstay of the Struts framework is the controller components, which
can be used with any Java presentation technology. As new technologies
become available, it is certain that new "glue" components will also
appear to help these technologies work as well with Struts.
    </p>
    <p>
        Struts originally came bundled with a set of custom JSP tags.
        Today, several extensions are available to help
        you use Struts with other popular presentation technologies, like
        XSLT and Velocity. Likewise, extensions for JSTL and JSF are now available as well.
    </p>
<p>
    The JSTL reference implementation is available through the
    <a href="http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html">Jakarta Taglibs site</a>.
    A JSTL taglibs for Struts,
    <a href="../userGuide/building_view.html#struts-el"><strong>Struts-El</strong></a>,
    is available and distributed with Struts beginning with the 1.1 release.
</p>
    <p>
        Meanwhile, the JSF specification is still under development,
        although an early-release reference implementation is available through the
        <a href="http://java.sun.com/webservices/download.html">Java Web Services Developer Pack</a>.
        An early-release JavaServer Faces taglib for Struts,
        <a href="http://archive.apache.org/dist/jakarta/struts/old/release/struts-faces/">
        <strong>Struts-Faces</strong></a>, is also in early release and available
        through the nightly build.
    </p>
    <p>
        For more about what JavaServer Faces means to the Struts community,
        see the <a href="http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsMoreAboutJSF">
        StrutsMoreAboutJSF</a> wiki page.
    </p>
</section>

<section href="ide" name="Is there a particularly good IDE to use with Struts">
<p>
Struts should work well with any development environment that you would like to use, as well as with any programmers editor. 
The members of the Struts development team each use their own tools such as 
<a href="http://www.gnu.org/software/emacs/emacs.html">Emacs</a>, 
<a href="http://www.intellij.com/idea/">IDEA</a>, 
<a href="http://www.eclipse.org/">Eclipse</a>, 
and <a href="http://www.netbeans.org/">NetBeans</a>.
</p>
<p>
At this writing, in the free zone, NetBeans had the edge with JSP editing, but Eclipse has more advanced refactoring features. 
Eclipse is also a general-purpose IDE and can be used with non-Java projects.
In the non-free zone, IDEA is highly regarded but costs money. (Of course, if *you* cost money, good tools are often a good investment.)
</p>
<p>
See the <a href="../faqs/index.html">Howto Guides</a> for more about configuring IDEs to work with Struts.
</p>
</section>

<section href="digest" name="Is there a digest for the User list?">
<p>
Yes. <a href="mailto:struts-user-digest-subscribe@jakarta.apache.org">send a blank message</a> to &lt; <a href="mailto:struts-user-digest-subscribe@jakarta.apache.org">struts-user-digest-subscribe@jakarta.apache.org</a>&gt;.
</p>
<p>
If you are subscribed to the digest, you can also post to the list.
Just be sure to send your post to the
<a href="mailto:struts-user@jakarta.apache.org">user list</a> rather than trying to reply to the digest.
</p>
</section>

<section href="newsgroup" name="Is there a Struts newsgroup?">
<p>
Not a usenet group, but the Struts User list can be accessed with your
favorite newsgroup reader from the
<a href="http://news.gmane.org/">GMane News Site</a>.  Subscribe to groups
<code>gmane.comp.jakarta.struts.devel</code> for the developer list, or
<code>gmane.comp.jakarta.struts.user</code> for the user list.
</p>
</section>

<section href="mailbounce" name="Why didn't my posting show up on the user list?">
<p>
You must be subscribed to the <a href="mailto:struts-user-subscribe@jakarta.apache.org">user list</a>
or <a href="mailto:struts-user-digest-subscribe@jakarta.apache.org">user digest</a> before posting
(or use the <a href="http://news.gmane.org">GMane Newsgroups</a> instead).
</p>
</section>

<section href="unsubscribe" name="How do I unsubscribe from the mailing list?">
<p>
<strong>From the email account used to subscribe to the list,</strong> <a href="mailto:struts-user-unsubscribe@jakarta.apache.org">send a blank message</a> to &lt; <a href="mailto:struts-user-unsubscribe@jakarta.apache.org">struts-user-unsubscribe@jakarta.apache.org</a>&gt;.
</p>
<p>
If you are receiving the digest, you must send a blank email to
&lt;<a href="mailto:struts-user-digest-unsubscribe@jakarta.apache.org">struts-user-unsubscribe@jakarta.apache.org</a>&gt;
instead.
</p>
</section>

</body></document>
