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

📄 release-notes-1.0-b1.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Struts Release Notes (Version 1.0-beta-1)</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="Craig R. McClanahan" name="author" />
<meta content="Martin Cooper" name="author" />
<link href="../struts.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="heading">
<a href="http://apache.org/">
<img id="asf_logo_wide" alt="The Apache Project" src="../images/asf_logo_wide.gif" />
</a>
<a href="http://struts.apache.org/">
<img id="struts-logo" alt="Struts Framework" src="../images/struts.gif" />
</a>
</div>
<!--end heading-->
<div id="content">
<div id="menu">

    
    
    <p>User Guide</p>
<ul>
      <li>
<a href="index.html">Table of Contents</a>
</li>
      <li>
<a href="preface.html">Preface</a>
</li>
      <li>
<a href="introduction.html">Introduction</a>
</li>
      <li>
<a href="building_model.html">Model Components</a>
</li>
      <li>
<a href="building_view.html">View Components</a>
</li>
      <li>
<a href="building_controller.html">Controller Components</a>
</li>
      <li>
<a href="configuration.html">Configuration</a>
</li>
      <li>
<a href="release-notes.html">Release Notes</a>
</li>
      <li>
<a href="installation.html">Installation</a>
</li>
    </ul>

    <p>Developer Guides</p>
<ul>
        <li>
<a href="dev_bean.html">Bean Tags</a>
</li>
        <li>
<a href="dev_html.html">HTML Tags</a>
</li>
        <li>
<a href="dev_logic.html">Logic Tags</a>
</li>
        <li>
<a href="dev_nested.html">Nested Tags</a>
</li>
        <li>
<a href="dev_tiles.html">Tiles Tags</a>
</li>
        <li>
<a href="dev_util.html">Utilities</a>
</li>
        <li>
<a href="dev_validator.html">Validator</a>
</li>
    </ul>

    <p>Quick Links</p>
<ul>
        <li>
<a href="../index.html">Welcome</a>
</li>
        <li>
<a href="index.html">User and Developer Guides *</a>
</li>
        <li>
<a href="../faqs/index.html">FAQs and HowTos</a>
</li>
    </ul>

<div class="authors">
<p>
<strong>Contributors</strong>
</p>
<ul>
<li>Craig R. McClanahan</li>
<li>Martin Cooper</li>
</ul>
</div>
</div>
<!--end menu-->
<div id="main">

  <h2 id="Introduction">Introduction</h2>
<div class="indent">

  <p>This document contains the release notes for
  <strong>Version 1.0-beta-1</strong> of the Struts Framework.
  The following sections cover
  <a href="#New">New Features</a> and <a href="#Changes">Changes</a> since
  the <strong>Version 0.5</strong> of Struts was made available.</p>

  <p>One global new feature to take note of is that Struts 1.0 requires
  a Java2 (JDK 1.2 or later) platform on which to run.</p>

  </div>


  <h2 id="New">What's New?</h2>
<div class="indent">

  <p>The following major new features have been added to the controller
  servlet and associated classes
  (package <code>org.apache.struts.action</code>):</p>
  <ul>
  <li>A new configuration file format, including the
      <a href="../../dtds/struts-config_1_0.dtd">Document Type Definition (DTD)</a>
      it is based on, is available for configuring the Struts controller
      servlet.  Support for the previous format is still present, but will
      be phased out by the 1.0 release.</li>
  <li>If enabled by setting the <code>locale</code> servlet initialization
      parameter to <code>true</code>, the controller servlet will now calculate
      a Locale for this user (based on the Locale returned by the servlet
      container, or by the HTTP headers included with the request)
      and store it in the user's session, unless the application
      has stored one there already.</li>
  <li>Application <code>Action</code> instances now have lifecycle support.
      The controller servlet will call <code>setServlet()</code> with a
      non-null argument when the instance is first created, and call it with
      a <code>null</code> argument when the instance is being shut down.</li>
  <li>The collection of "standard" Struts actions (in package
      <code>org.apache.struts.actions</code>) is kicked off with a set of
      simple actions that allow on-the-fly changes in the form bean, forward,
      and mapping definitions registered with the controller servlet.  These
      actions would normally be configured behind security constraints to
      prevent interference with the operation of your application but can be
      very useful during development.</li>
  <li>A new representation of error messages (<code>ActionError</code> and
      <code>ActionErrors</code>) has been created that allows errors to be
      associated with individual fields, and stores parameter replacement
      values along with the messages keys.</li>
  <li>The <code>ActionForm</code> interface has been converted to a base class,
      with default implementations of some useful functionality.  In addition,
      the new class provides two <code>validate()</code> methods that take
      the current mapping and current request as arguments, in order to provide
      access to more context information than just the properties of this
      particular form bean.</li>
  <li>The new <code>ActionForm</code> class also provides two
      <code>reset()</code> methods that take the current mapping and current
      request as arguments, in order to provide access to more context
      information (particularly important on multi-page forms so that the form
      bean knows which properties to reset).  Among other things, use of the
      <code>reset()</code> methods can prevent problems with checkbox fields
      -- simply reset boolean fields to <code>false</code> and they will be
      set to <code>true</code> (during auto-population of the form bean
      properties) only if the checkbox was actually checked.</li>
  <li>All servlet context attributes created by the Struts controller servlet
      itself (but not the Struts Example application) now implement
      <code>java.io.Serializable</code>.</li>
  <li>The <code>Action</code> class now includes support for "transactional
      tokens", so that you can detect cases where the user submitted a form,
      then went back and resubmitted the form again.</li>
  </ul>

  <p>The following major new features have been added to the
  <em>struts-bean</em> custom tag library (package
  <code>org.apache.struts.taglib.bean</code>):</p>
  <ul>
  <li>A new custom tag, <code>&lt;bean:page&gt;</code>, is available
      to expose key items from the page context associated with the current
      page as scripting variables, and as page-scope beans.  For example,
      you can use the following sequence to render the server information
      string returned by our servlet context:
      <pre>
      &lt;bean:page id="app" property="application"/&gt;
      &lt;bean:write name="app" property="serverInfo"/&gt;
      </pre>
</li>
  <li>A new custom tag, <code>&lt;bean:struts&gt;</code>, is available
      to expose internal Struts configuration objects (form bean, forward,
      and mapping definitions) as scripting variables and page-scope beans.
      For example, you can use the following sequence to render the actual
      context-relative path of an <code>ActionForward</code> object:
      <pre>
      &lt;bean:struts id="link" forward="success"/&gt;
      &lt;bean:write name="link" property="path"/&gt;
      </pre>
</li>
  <li>All of the tags in this library that accept a <code>name</code>
      attribute referring to a JSP bean now also accept an optional
      <code>scope</code> attribute to define the scope in which to search
      for that bean.  If not specified, all scopes are searched.</li>
  <li>The <code>&lt;bean:size&gt;</code> tag will create a bean that stores
      the number of elements of an array, Collection, or Map.</li>
  </ul>

  <p>The <em>struts-html</em> custom tag library has been created (package
  <code>org.apache.struts.taglib.html</code>), based on the old tags that
  were related to HTML form presentation.  The following differences from
  the old tags are notable:</p>
  <ul>
  <li>You must now reference the "struts-html.tld" TLD to access these
      tags.</li>
  <li>All attribute names matching JavaScript event handlers are now all
      lower case (onClick --&gt; onclick) to conform to XHTML.</li>
  <li>The <code>options1</code> tag has been eliminated since Struts is now
      based on Java2.</li>
  <li>All tag implementation classes have had their <code>final</code>
      modifiers removed, and <code>private</code> instance variables
      changed to <code>protected</code>.  This makes it possible to easily
      subclass these tags to provide specialized functionality.</li>
  <li>The <code>&lt;html:link&gt;</code> tag has been enhanced to support
      a new <code>page</code> attribute that allows you to use
      context-relative URIs in a portable manner.</li>
  <li>A new <code>&lt;html:html&gt;</code> tag has been created that
      renders an HTML <code>&lt;html&gt;</code> element with appropriate
      <code>lang</code> and <code>xml:lang</code> attributes, based on the
      locale stored for the user's session (if there is one).</li>
  <li>A new <code>&lt;rewrite&gt;</code> tag has been created that
      renders a request URI, possibly encoded with a session identifier,
      based on exactly the same rules used by the <code>&lt;link&gt;</code>
      tag that generates hyperlinks.  These constants can be useful when
      you are creating JavaScript code that needs to be aware of Struts
      addressing concepts.</li>
  <li>The <code>options</code> tag now supports a new <code>collection</code> attribute,
      which can be used to specify a collection whose beans have properties
      that return the value (to be returned to the server) and the label (to
      be displayed to the user) from a single collection.  The previous
      support for processing parallel collections is still available.</li>
  <li>The <code>form</code> tag has been enhanced to look up the name of the
      form bean, it's Java class, and the scope in which the bean should be
      created or accessed, from the corresponding action mapping entry in the
      "struts-config.xml" file, if the <code>name</code>, <code>scope</code>,
      and <code>type</code> attributes are not specified.  This removes the
      need to make changes in two places when these values are changed.</li>
  <li>A new <code>&lt;image&gt;</code> tag has been added, to create
      HTML input tags of type "image".</li>
<li>The <code>form</code> tag has been enhanced to read its configuration from 
      a corresponding action mapping entry in the "struts-config.xml" file, 
      if the <code>name</code>, <code>scope</code>, and <code>type</code> 
      attributes are not specified. It can look up the name of the
      form bean, its Java class, the scope in which the bean should be
      created or accessed, plus the path to which the form should be
      submitted. This removes the need to make changes in two places when these 
      values are changed. It works for cases where the controller servlet is 
      extension mapped or path mapped.</li>
  <li>The <code>&lt;html:img&gt;</code> tag has been added, to render an HTML
      <code>&lt;img&gt;</code> tag.</li>
  </ul>

  <p>A new package of Actions and associated classes for handling file uploads
  has been created (package <code>org.apache.struts.upload</code>):</p>
  <ul>
  <li>The basic package of file upload handling actions has been created.</li>
  <li>An example application illustrating the use of the new features
      has been added (<code>webapps/struts-upload.war</code>).</li>
  </ul>

  <p>The following major new features have been added to the utility classes
  library (package <code>org.apache.struts.util</code>):</p>

⌨️ 快捷键说明

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