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

📄 struts-logic.tld

📁 整合struts+velocity模板语言
💻 TLD
📖 第 1 页 / 共 5 页
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib
        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
    <tlib-version>1.3</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>logic</short-name>
    <uri>http://struts.apache.org/tags-logic</uri>
    <description>
        <![CDATA[
  <p><strong>Note:  Some of the features in this taglib are also
  available in the <a href="http://java.sun.com/products/jsp/jstl/">JavaServer Pages Standard Tag Library (JSTL)</a>.
  The Struts team encourages the use of the standard tags over the Struts
  specific tags when possible.</strong></p>

  <p>This tag library contains tags that are useful in managing conditional
  generation of output text, looping over object collections for
  repetitive generation of output text, and application flow management.</p>

  <p>For tags that do value comparisons (<code>equal</code>,
  <code>greaterEqual</code>, <code>greaterThan</code>, <code>lessEqual</code>,
  <code>lessThan</code>, <code>notEqual</code>), the following rules apply:</p>
  <ul>
  <li>The specified value is examined.  If it can be converted successfully
      to a <code>double</code> or a <code>long</code>, it is assumed that the
      ultimate comparison will be numeric (either floating point or integer).
      Otherwise, a String comparison will be performed.</li>
  <li>The variable to be compared to is retrieved, based on the selector
      attribute(s) (<code>cookie</code>, <code>header</code>,
      <code>name</code>, <code>parameter</code>, <code>property</code>)
      present on this tag.  It will be converted to the appropriate type
      for the comparison, as determined above.</li>
  <li>If the specified variable or property returns null, it will be
      coerced to a zero-length string before the comparison occurs.</li>
  <li>The specific comparison for this tag will be performed, and the nested
      body content of this tag will be evaluated if the comparison returns
      a <code>true</code> result.</li>
  </ul>

  <p>For tags that do substring matching (<code>match</code>,
  <code>notMatch</code>), the following rules apply:</p>
  <ul>
  <li>The specified variable is retrieved, based on the selector attribute(s)
      (<code>cookie</code>, <code>header</code>, <code>name</code>,
      <code>parameter</code>, <code>property</code>) present on this tag.
      The variable is converted to a String, if necessary.</li>
  <li>A request time exception will be thrown if the specified variable
      cannot be retrieved, or has a null value.</li>
  <li>The specified value is checked for existence as a substring of the
      variable, in the position specified by the <code>location</code>
      attribute, as follows:  at the beginning (if location is set to
      <code>start</code>), at the end (if location is set to
      <code>end</code>), or anywhere (if location is not specified).</li>
  </ul>

  <p>Many of the tags in this tag library will throw a
  <code>JspException</code> at runtime when they are utilized incorrectly
  (such as when you specify an invalid combination of tag attributes).  JSP
  allows you to declare an "error page" in the <code>&lt;%@ page %&gt;</code>
  directive.  If you wish to process the actual exception that caused the
  problem, it is passed to the error page as a request attribute under key
  <code>org.apache.struts.action.EXCEPTION</code>.</p>

  ]]>
    </description>
    <tag>
        <name>empty</name>
        <tag-class>org.apache.struts.taglib.logic.EmptyTag</tag-class>
        <body-content>JSP</body-content>
        <description>
            <![CDATA[
            <p><strong>
    Evaluate the nested body content of this tag if the requested variable is
    either null or an empty string.
    </strong></p>
          
    <p>This tag evaluates its nested body content only if the specified value
    is either absent (i.e. <code>null</code>), an empty string (i.e. a
    <code>java.lang.String</code> with a length of zero), or an empty
    <code>java.util.Collection</code> or <code>java.util.Map</code> (tested by
    the .isEmpty() method on the respective interface).</p>
    
    <p>
    <strong>JSTL</strong>:  The equivalent JSTL tag is &lt;c:if&gt; using the 
    <code>empty</code> operator.  For example,
    <br/>
    <code>
    	&lt;c:if test="${empty sessionScope.myBean.myProperty}"&gt;
    	  do something
    	&lt;/c:if&gt;
    </code>
    </p>
    
            <dl><dt><b>Since:</b></dt>
            <dd>Struts 1.1</dd></dl>
          ]]>
        </description>
        <attribute>
            <name>name</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the JSP bean specified by this
      attribute, if <code>property</code> is not specified, or the value
      of the specified property of this bean, if <code>property</code>
      is specified.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>property</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the property (of the bean specified
      by the <code>name</code> attribute) specified by this attribute.
      The property reference can be simple, nested, and/or indexed.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>scope</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The bean scope within which to search for the bean named by the
      <code>name</code> property, or "any scope" if not specified.</p>
      ]]>
            </description>
        </attribute>
    </tag>
    <tag>
        <name>equal</name>
        <tag-class>org.apache.struts.taglib.logic.EqualTag</tag-class>
        <body-content>JSP</body-content>
        <description>
            <![CDATA[
            <p><strong>
    Evaluate the nested body content of this tag if the requested
    variable is equal to the specified value.
    </strong></p>
          
    <p>Compares the variable specified by one of the selector attributes
    against the specified constant value.  The nested body content of this
    tag is evaluated if the variable and value are <strong>equal</strong>.
    </p>
    ]]>
        </description>
        <attribute>
            <name>cookie</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the value of the cookie whose
      name is specified by this attribute.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>header</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the value of the header whose
      name is specified by this attribute.  The name match is performed
      in a case insensitive manner.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>name</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the JSP bean specified by this
      attribute, if <code>property</code> is not specified, or the value
      of the specified property of this bean, if <code>property</code>
      is specified.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>parameter</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the first, or only, value of the
      request parameter specified by this attribute.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>property</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the property (of the bean specified
      by the <code>name</code> attribute) specified by this attribute.
      The property reference can be simple, nested, and/or indexed.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>scope</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The bean scope within which to search for the bean named by the
      <code>name</code> property, or "any scope" if not specified.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>value</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The constant value to which the variable, specified by other
      attribute(s) of this tag, will be compared.</p>
      ]]>
            </description>
        </attribute>
    </tag>
    <tag>
        <name>forward</name>
        <tag-class>org.apache.struts.taglib.logic.ForwardTag</tag-class>
        <body-content>empty</body-content>
        <description>
            <![CDATA[
            <p><strong>
    Forward control to the page specified by the specified ActionForward
    entry.
    </strong></p>
          
    <p>Performs a <code>PageContext.forward()</code> or
    <code>HttpServletResponse.sendRedirect()</code> call for the global
    <code>ActionForward</code> entry for the specified name.  URL
    rewriting will occur automatically if a redirect is performed.</p>
    ]]>
        </description>
        <attribute>
            <name>name</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>
      	The logical name of the global <code>ActionForward</code> entry
      	that identifies the destination, and forwarding approach, to be used.
        <strong>Note</strong>: forwarding to Tiles definitions is not supported
        from this tag.  You should forward to them from an Action subclass.
      </p>
      ]]>
            </description>
        </attribute>
    </tag>
    <tag>
        <name>greaterEqual</name>
        <tag-class>org.apache.struts.taglib.logic.GreaterEqualTag</tag-class>
        <body-content>JSP</body-content>
        <description>
            <![CDATA[
            <p><strong>
    Evaluate the nested body content of this tag if the requested
    variable is greater than or equal to the specified value.
    </strong></p>
          
    <p>Compares the variable specified by one of the selector attributes
    against the specified constant value.  The nested body content of this
    tag is evaluated if the variable is <strong>greater than or equal</strong>
    to the value.</p>
    ]]>
        </description>
        <attribute>
            <name>cookie</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the value of the cookie whose
      name is specified by this attribute.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>header</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the value of the header whose
      name is specified by this attribute.  The name match is performed
      in a case insensitive manner.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>name</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the JSP bean specified by this
      attribute, if <code>property</code> is not specified, or the value
      of the specified property of this bean, if <code>property</code>
      is specified.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>parameter</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
      <p>The variable to be compared is the first, or only, value of the
      request parameter specified by this attribute.</p>
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>property</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>

⌨️ 快捷键说明

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