⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kickstart.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<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>
</div>
<h2 id="tests">Does Struts include its own unit tests?</h2>
<div class="indent">
<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 source 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>
</div>
<h2 id="requests">If the framework doesn't do what I want, can I request that a feature be added?</h2>
<div class="indent">
<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 <a href="../helping.html">submit a patch</a> 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>
</div>
<h2 id="help">Where can I get help with Struts?</h2>
<div class="indent">
<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://struts.apache.org/">Struts Web site</a>.
</p>
<p>
The
<a href="http://struts.apache.org/using.html#lists">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>
</div>
<h2 id="support">Is commercial support available?</h2>
<div class="indent">
<p>There is no official, commercial support for Struts, though third parties may offer different degrees of support. </p>
</div>
<h2 id="providers">Are there ISPs that will host my Struts application?</h2>
<div class="indent">
<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>
</div>
<h2 id="turbine">What's the difference between Struts and Turbine? What's the difference between Struts and Expresso?</h2>
<div class="indent">
<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>
</div>
<h2 id="taglibs">Why aren't the Struts tags maintained as part of the Jakarta Taglibs project?</h2>
<div class="indent">
<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>
</div>
<h2 id="xhtml">Are the Struts tags XHTML compliant?</h2>
<div class="indent">
<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>
</div>
<h2 id="wml">Will the Struts tags support other markup languages such as WML</h2>
<div class="indent">
<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>
</div>
<h2 id="jsf">What about JSTL and JavaServer Faces?</h2>
<div class="indent">
    <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, is the specification co-lead for
JavaServer Faces (JSR 127), and architect of the reference implemenation
as well as Java Studio Creator. Both JSTL and JSF 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>
        The JSF specification and reference implementation is available through Sun's
        The JSF specification and reference implementation is available through Sun's
        <a href="http://java.sun.com/j2ee/javaserverfaces/index.jsp">Java ServerFaces page</a>.
        An early-release JavaServer Faces taglib for Struts,
        <strong>Struts-Faces</strong>, is also in early release and available through the
        <a href="http://svn.apache.org/builds/jakarta-struts/nightly/struts-faces/">nightly build</a>.
        The Struts Faces taglib is expected to work with any compliant JSF implementation, including
        <a href="http://www.myfaces.org/">MyFaces</a>.
    </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>
</div>
<h2 id="ide">Is there a particularly good IDE to use with Struts</h2>
<div class="indent">
<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>
See the <a href="../faqs/index.html">Howto Guides</a> for more about configuring IDEs to work with Struts.
</p>
</div>
<h2 id="digest">Is there a digest for the User list?</h2>
<div class="indent">
<p>
Yes. <a href="mailto:user-digest-subscribe@struts.apache.org">send a blank message</a> to &lt; <a href="mailto:user-digest-subscribe@struts.apache.org">user-digest-subscribe@struts.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:user@struts.apache.org">user list</a> rather than trying to reply to the digest.
</p>
</div>
<h2 id="newsgroup">Is there a Struts newsgroup?</h2>
<div class="indent">
<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>
</div>
<h2 id="mailbounce">Why didn't my posting show up on the user list?</h2>
<div class="indent">
<p>
You must be subscribed to the <a href="mailto:user-subscribe@struts.apache.org">user list</a>
or <a href="mailto:user-digest-subscribe@struts.apache.org">user digest</a> before posting
(or use the <a href="http://news.gmane.org">GMane Newsgroups</a> instead).
</p>
</div>
<h2 id="unsubscribe">How do I unsubscribe from the mailing list?</h2>
<div class="indent">
<p>
<strong>From the email account used to subscribe to the list,</strong> <a href="mailto:user-unsubscribe@struts.apache.org">send a blank message</a> to &lt; <a href="mailto:user-unsubscribe@struts.apache.org">user-unsubscribe@struts.apache.org</a>&gt;.
</p>
<p>
If you are receiving the digest, you must send a blank email to
&lt;<a href="mailto:user-digest-unsubscribe@struts.apache.org">user-unsubscribe@struts.apache.org</a>&gt;
instead.
</p>
</div>
</div>
<!--end main-->
</div>
<!--end content-->
<div id="footer">
<img id="powered-logo" alt="Powered by Struts" src="../images/struts-power.gif" />
        Copyright (c) 2000-2005, The Apache Software Foundation <span class="noprint">- 
        <a href="http://wiki.apache.org/struts/StrutsDocComments">Comments?</a>
</span>
</div>
<!--end footer-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -