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

📄 package-summary.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Mar 09 15:31:21 GMT 2006 -->
<TITLE>
Apache Struts API Documentation: Package org.apache.struts.taglib.html
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/struts/taglib/bean/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/struts/taglib/logic/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<H2>
Package org.apache.struts.taglib.html
</H2>
<a name="doc.Description">The "struts-html" tag library</a>
  contains JSP custom tags useful in creating dynamic HTML user interfaces,
including input forms.
<P>
<B>See: </B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="BaseFieldTag.html">BaseFieldTag</A></B></TD>
<TD>Convenience base class for the various input tags for text fields.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="BaseHandlerTag.html">BaseHandlerTag</A></B></TD>
<TD>Base class for tags that render form elements capable of including JavaScript event handlers and/or CSS Style attributes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="BaseInputTag.html">BaseInputTag</A></B></TD>
<TD>Abstract base class for the various input tags.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="BaseTag.html">BaseTag</A></B></TD>
<TD>Renders an HTML <base> element with an href  attribute pointing to the absolute location of the enclosing JSP page.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ButtonTag.html">ButtonTag</A></B></TD>
<TD>Renders an HTML BUTTON tag within the Struts framework.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="CancelTag.html">CancelTag</A></B></TD>
<TD>Tag for input fields of type "cancel".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="CheckboxTag.html">CheckboxTag</A></B></TD>
<TD>Tag for input fields of type "checkbox".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Constants.html">Constants</A></B></TD>
<TD>Manifest constants for this package.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ErrorsTag.html">ErrorsTag</A></B></TD>
<TD>Custom tag that renders error messages if an appropriate request attribute has been created.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="FileTag.html">FileTag</A></B></TD>
<TD>Custom tag for input fields of type "file".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="FormTag.html">FormTag</A></B></TD>
<TD>Custom tag that represents an input form, associated with a bean whose properties correspond to the various fields of the form.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="FrameTag.html">FrameTag</A></B></TD>
<TD>Generate an HTML <code>&lt;frame&gt;</code> tag with similar capabilities as those the <code>&lt;html:link&gt;</code> tag provides for hyperlink elements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="HiddenTag.html">HiddenTag</A></B></TD>
<TD>Custom tag for input fields of type "hidden".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="HtmlTag.html">HtmlTag</A></B></TD>
<TD>Renders an HTML <html> element with appropriate language attributes if there is a current Locale available in the user's session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ImageTag.html">ImageTag</A></B></TD>
<TD>Tag for input fields of type "image".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ImgTag.html">ImgTag</A></B></TD>
<TD>Generate an IMG tag to the specified image URI.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="JavascriptValidatorTag.html">JavascriptValidatorTag</A></B></TD>
<TD>Custom tag that generates JavaScript for client side validation based on the validation rules loaded by the <code>ValidatorPlugIn</code> defined in the struts-config.xml file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="LinkTag.html">LinkTag</A></B></TD>
<TD>Generate a URL-encoded hyperlink to the specified URI.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="MessagesTag.html">MessagesTag</A></B></TD>
<TD>Custom tag that iterates the elements of a message collection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="MessagesTei.html">MessagesTei</A></B></TD>
<TD>Implementation of <code>TagExtraInfo</code> for the <b>messages</b> tag, identifying the scripting object(s) to be made visible.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="MultiboxTag.html">MultiboxTag</A></B></TD>
<TD>Tag for input fields of type "checkbox".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="OptionsCollectionTag.html">OptionsCollectionTag</A></B></TD>
<TD>Tag for creating multiple &lt;select&gt; options from a collection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="OptionsTag.html">OptionsTag</A></B></TD>
<TD>Tag for creating multiple &lt;select&gt; options from a collection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="OptionTag.html">OptionTag</A></B></TD>
<TD>Tag for select options.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="PasswordTag.html">PasswordTag</A></B></TD>
<TD>Custom tag for input fields of type "password".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="RadioTag.html">RadioTag</A></B></TD>
<TD>Tag for input fields of type "radio".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ResetTag.html">ResetTag</A></B></TD>
<TD>Tag for input fields of type "reset".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="RewriteTag.html">RewriteTag</A></B></TD>
<TD>Generate a URL-encoded URI as a string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="SelectTag.html">SelectTag</A></B></TD>
<TD>Custom tag that represents an HTML select element, associated with a bean property specified by our attributes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="SubmitTag.html">SubmitTag</A></B></TD>
<TD>Tag for input fields of type "submit".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="TextareaTag.html">TextareaTag</A></B></TD>
<TD>Custom tag for input fields of type "textarea".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="TextTag.html">TextTag</A></B></TD>
<TD>Custom tag for input fields of type "text".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="XhtmlTag.html">XhtmlTag</A></B></TD>
<TD>This tag tells all other html taglib tags to render themselves in xhtml.</TD>
</TR>
</TABLE>
&nbsp;

<P>
<A NAME="package_description"><!-- --></A><H2>
Package org.apache.struts.taglib.html Description
</H2>

<P>
<p><a name="doc.Description">The "struts-html" tag library</a>
  contains JSP custom tags useful in creating dynamic HTML user interfaces,
including input forms.</p>

<div align="Center">
<p> <a href="#doc.Intro">[Introduction]</a>
  <a href="#doc.Form">[HTML Form Tags]</a>
      <a href="#doc.Other">[Other HTML Tags]</a>
  </p>
  </div>

<hr>
<h3><a name="doc.Intro">Introduction</a>
 </h3>

<p>The tags in the Struts HTML library form a bridge between a JSP view and
the   other components of a Web application. Since a dynamic Web application
often   depends on gathering data from a user, input forms play an important
role in   the Struts framework. Consequently, the majority of the HTML tags
involve <a href="#doc.Form">HTML</a>
    forms. Other important issues addressed by the Struts-HTML tags are <a href="#doc.Other.messages">
 messages</a>
 ,    <a href="#doc.Other.errors">error messages</a>
 , <a href="#doc.Other.hyperlinking">hyperlinking</a>
  and <a href="#doc.Other.i18n">internationalization</a>
 .<br>
</p>
<div align="Center"> <img src="doc-files/htmlUML.gif" alt="Tags that wrap the html tags">
 <br>
 </div>



<hr>
<h3><a name="doc.Form">HTML "form" tags</a>
 </h3>

<ul>
      <li><a href="../../../../../../userGuide/struts-html.html#button">button</a>
   </li>
      <li><a href="../../../../../../userGuide/struts-html.html#cancel">cancel</a>
   </li>
      <li><a href="../../../../../../userGuide/struts-html.html#checkbox">checkboxes</a>
   </li>
      <li><a href="../../../../../../userGuide/struts-html.html#file">file</a>
   </li>
      <li><a href="../../../../../../userGuide/struts-html.html#hidden">hidden</a>
   </li>
      <li><a href="../../../../../../userGuide/struts-html.html#image">image</a>
   </li>
      <li><a href="../../../../../../userGuide/struts-html.html#multibox">multibox</a>
   </li>
      <li><a href="../../../../../../userGuide/struts-html.html#password">password</a>
  input fields</li>
      <li><a href="../../../../../../userGuide/struts-html.html#radio">radio</a>
  buttons</li>
      <li><a href="../../../../../../userGuide/struts-html.html#reset">reset</a>
  buttons</li>
      <li><a href="../../../../../../userGuide/struts-html.html#select">select</a>
  lists with embedded</li>
      <li><a href="../../../../../../userGuide/struts-html.html#option">option</a>
   </li>
      <li><a href="../../../../../../userGuide/struts-html.html#options">options</a>
   </li>
      <li><a href="../../../../../../userGuide/struts-html.html#submit">submit</a>
  buttons</li>
      <li><a href="../../../../../../userGuide/struts-html.html#text">text</a>
  input fields</li>
      <li><a href="../../../../../../userGuide/struts-html.html#textarea">textareas</a>
   </li>

</ul>

<p>Each of these tags must be nested within a &lt;html:form&gt; tag.</p>

<h4><a name="doc.Form.formTag">About the form tag</a>
 </h4>

<p>The Struts <code>form</code> tag outputs a standard HTML form tag, and
also links the input form with a JavaBean subclassed from the Struts
<a href="../../action/ActionForm.html">ActionForm</a>object.
Each field in   the form should correspond to a property of the form's
bean. When a field and   property correspond, the bean is first used to populate
the form, and then to   store the user's input when the form is submitted
to the controller servlet.</p>

<p>The name of the bean and its class can be specified as a property to the
form tag, but may also be omitted. If omitted, the <code>ActionMappings</code>
  database (loaded from the <code>struts-config.xml</code> file) is consulted.
If the current page is specified as the <code>input</code> property for an
<code>action</code>, the name of the <code>action</code> is used. The <code>
 type</code> property for the bean is also then taken from the configuration,
via a Form Bean definition.</p>

<p>Here's a clip from the Struts Example configuration:</p>

<pre>&lt;action-mappings&gt;<br>  &lt;!-- Process a user logon --&gt;<br>  &lt;action path="/logon"<br>    type="org.apache.struts.webapp.example.LogonAction"<br>    name="logonForm"<br>    scope="request"<br>    input="/logon.jsp"&gt;<br>  &lt;/action&gt;<br>  &lt; ... /&gt;<br>&lt;/action-mappings&gt;<br>&lt;form-beans&gt;<br>  &lt;!-- Logon form bean --&gt;<br>  &lt;form-bean name="logonForm"<br>    type="org.apache.struts.webapp.example.LogonForm"/&gt;<br>  &lt; ... /&gt;<br>  &lt;/form-beans&gt;<br>&lt;/pre&gt;<br></pre>

<p>Given this configuration, the HTML form tag for <code>logon.jsp</code>
  will default to using "<code>logonForm</code>" as its name property and
"<code> org.apache.struts.webapp.example.LogonForm</code>" as the attribute's type.
This way you can manage the namespace for your framework components from
the configuration file.</p>

<p>If the form tag does not find the form bean in any of the scopes (page,

⌨️ 快捷键说明

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