<%@ taglib uri="/struts-tags" prefix="s"%>

<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>

<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>

<%@ taglib uri="/WEB-INF/tld/taglibs-string.tld" prefix="str" %>

<%@ taglib uri="/WEB-INF/tld/valuelist.tld" prefix="vlh"%>

<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>(貌似自定义标签其实和这句差不多<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>)

用法(url是配置里的name—>有tag-class的那个其他的name是这个标签的属性)

<c:url value='/berheley/calendar/affairAdd.ao?method=goUrl'/>

<c:foreach items=””/>

<?xml version="1.0" encoding="UTF-8" ?>

<taglib xmlns="http://java.sun.com/xml/ns/j2ee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"

version="2.0">

<description>JSTL 1.1 core library</description>

<display-name>JSTL core</display-name>

<tlib-version>1.1</tlib-version>

<short-name>c</short-name>

<uri>http://java.sun.com/jsp/jstl/core</uri>

<validator>

<description>

Provides core validation features for JSTL tags.

</description>

<validator-class>

org.apache.taglibs.standard.tlv.JstlCoreTLV

</validator-class>

</validator>

<tag>

<description>

Creates a URL with optional query parameters.

</description>

<name>url</name>

<tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>

<body-content>JSP</body-content>

<attribute>

<description>

Name of the exported scoped variable for the

processed url. The type of the scoped variable is

String.

</description>

<name>var</name>

<required>false</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

<attribute>

<description>

Scope for var.

</description>

<name>scope</name>

<required>false</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

<attribute>

<description>

URL to be processed.

</description>

<name>value</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<description>

Name of the context when specifying a relative URL

resource that belongs to a foreign context.

</description>

<name>context</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

<tag>

<description>

Retrieves an absolute or relative URL and exposes its contents

to either the page, a String in 'var', or a Reader in 'varReader'.

</description>

<name>import</name>

<tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>

<tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>

<body-content>JSP</body-content>

<attribute>

<description>

The URL of the resource to import.

</description>

<name>url</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<description>

Name of the exported scoped variable for the

resource's content. The type of the scoped

variable is String.

</description>

<name>var</name>

<required>false</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

<attribute>

<description>

Scope for var.

</description>

<name>scope</name>

<required>false</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

<attribute>

<description>

Name of the exported scoped variable for the

resource's content. The type of the scoped

variable is Reader.

</description>

<name>varReader</name>

<required>false</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

<attribute>

<description>

Name of the context when accessing a relative

URL resource that belongs to a foreign

context.

</description>

<name>context</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<description>

Character encoding of the content at the input

resource.

</description>

<name>charEncoding</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

<tag>

<description>

The basic iteration tag, accepting many different

collection types and supporting subsetting and other

functionality

</description>

<name>forEach</name>

<tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>

<tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>

<body-content>JSP</body-content>

<attribute>

<description>

Collection of items to iterate over.

</description>

<name>items</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

<type>java.lang.Object</type>

</attribute>

<attribute>

<description>

If items specified:

Iteration begins at the item located at the

specified index. First item of the collection has

index 0.

If items not specified:

Iteration begins with index set at the value

specified.

</description>

<name>begin</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

<type>int</type>

</attribute>

<attribute>

<description>

If items specified:

Iteration ends at the item located at the

specified index (inclusive).

If items not specified:

Iteration ends when index reaches the value

specified.

</description>

<name>end</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

<type>int</type>

</attribute>

<attribute>

<description>

Iteration will only process every step items of

the collection, starting with the first one.

</description>

<name>step</name>

<required>false</required>

<rtexprvalue>true</rtexprvalue>

<type>int</type>

</attribute>

<attribute>

<description>

Name of the exported scoped variable for the

current item of the iteration. This scoped

variable has nested visibility. Its type depends

on the object of the underlying collection.

</description>

<name>var</name>

<required>false</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

<attribute>

<description>

Name of the exported scoped variable for the

status of the iteration. Object exported is of type

javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested

visibility.

</description>

<name>varStatus</name>

<required>false</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

</tag>

<input type="hidden" name="bysq.imageUrl" id="imageUrl" value="<s:property value="bysq.imageUrl"/>"/>

S标签的用法,value取值是不要${}EL表达式的,其实除了c标签,struts的标签都不用EL表达式就可以取到值。

struts的标签的更多相关文章

  1. struts的标签库出现Failed to load or instantiate TagExtraInfo class

    使用struts的标签库出现Failed to load or instantiate TagExtraInfo class 最近在使用struts标签库的时候,在eclipse开发环境中是正常的,放 ...

  2. Struts 2 标签库及使用

    1  Struts 2 基本的标签属性. 1) name:指定表单元素的名称,该属性与Action中定义的属性相对应. 2) value:指定表单元素的值. 3) required:指定表单元素的必填 ...

  3. Struts1基础、使用Struts实现登录、使用Struts HTML标签简化开发

    Struts 1基础 为什么重拾Struts 1 曾经是最主流的MVC框架 市场份额依然很大 很多遗留系统中依旧使用 维护和升级都需要熟悉Struts 1 与Struts 2相比 编码.配置繁琐 侵入 ...

  4. 5.Struts.xml标签中的一些小技巧

    1.为Action属性注入值如给actions包下的test.java类中变量username赋值为"xingyun"在struts.xml中添加下面这段代码: <strut ...

  5. 菜鸟学习Struts——bean标签库

    一.Struts标签库. Struts实际上包含了4个标签库:bean,logic,html,tiles bean:用来在属性范围中定义或取得属性的,同时可以读取资源文件信息 logic:替代JSTL ...

  6. Struts2笔记——struts常用标签

    使用struts标签前,首先要配置struts2架构,然后导入标签库,jsp插入如下语句: <%@taglib uri="/struts-tags" prefix=" ...

  7. Struts 2 标签

    注:要使用Strust 2标签需<%@ taglib prefix="s" uri="/struts-tags" %> 表单标签: .form标签 ...

  8. Struts 2 标签库

    <s:if>标签 拥有一个test属性,其表达式的值用来决定标签里内容是否显示 <s:if test="#request.username=='clf'"> ...

  9. Struts UI标签的使用

    先来看一下日期控件 html5标签中其实已经有日期的类型,用<input type="date">便可调用. struts里面也自带了日期控件,其使用步骤为: 1. 导 ...

随机推荐

  1. 网页显示百度地图 Jquery

    cshtml: <div class="modal" style="visibility: hidden"> <div id="ma ...

  2. 第83天:jQuery中操作form表单

    操作form表单 1. 属性操作 设置属性: // 第一个参数表示:要设置的属性名称 // 第二个参数表示:该属性名称对应的值 $(selector).attr(“title”, “传智播客”); 获 ...

  3. BZOJ4974 字符串大师(kmp)

    显然最短循环节长度=i-next[i],则相当于给定next数组构造字符串.然后按照kmp的过程模拟即可.虽然这看起来是一个染色问题,但是由图的特殊性,如果next=0只要贪心地选最小的就可以了,稍微 ...

  4. 【BZOJ2653】Middle(主席树)

    [BZOJ2653]Middle(主席树) 题面 BZOJ 洛谷 Description 一个长度为n的序列a,设其排过序之后为b,其中位数定义为b[n/2],其中a,b从0开始标号,除法取下整.给你 ...

  5. KMP算法复习【+继续学习】

    离NOIP还剩12天,本蒟蒻开始准备复习了. 先来个KMP[似乎我并没有写过KMP的blog] KMP KMP算法是解决字符串匹配问题的一个算法,主要是单对单的字符串匹配加速,时间复杂度O(m + n ...

  6. Java之基础20160806

    注意这里介绍的JAVA基础是指你对C语言已经比较熟练或者有一定基础了,再学习如下这知识就会比较快. 1.JAVA也是从MAIN开始执行,但是要先定义类,文件名要与类名一致并且类名首字母要大写,同时JA ...

  7. Measure the size of a PostgreSQL table row

    Q:   I have a PostgreSQL table. select * is very slow whereas select id is nice and quick. I think i ...

  8. codeforces gym 100952 A B C D E F G H I J

    gym 100952 A #include <iostream> #include<cstdio> #include<cmath> #include<cstr ...

  9. 安装黑苹果的config.plist

    前提条件:有mac真机.目前在测试虚拟机可行性 第一步:制作U盘启动盘 1.在 app store 下载 mac OS sierra 镜像 2.格式化 U 盘,gpt 格式 3.执行以下命令(具体名称 ...

  10. jbpm3.2创建数据库

    因为jbpm3.2的sql脚本有问题,所以我们通过查询来执行是有问题的,所以这里我们通过java代码来执行,这个是没有问题的. 参考博文: http://blog.csdn.net/sz_bdqn/a ...