<%@ 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. 我以前不知道的 Session

    之前只知道 Session 是服务器与客户端的一个会话,有默认过期时间,是服务器端的技术,与之对应的是 Cookie 技术,是客户端技术. 下面的几点是之前不知道的:[或者是忘了] 1 . Sessi ...

  2. 【数据库】SQL两表之间:根据一个表的字段更新另一个表的字段

    1. 写法轻松,更新效率高:update table1 set field1=table2.field1,field2=table2.field2from table2where table1.id= ...

  3. HDU 4758——Walk Through Squares——2013 ACM/ICPC Asia Regional Nanjing Online

    与其说这是一次重温AC自动机+dp,倒不如说这是个坑,而且把队友给深坑了. 这个题目都没A得出来,我只觉得我以前的AC自动机的题目都白刷了——深坑啊. 题目的意思是给你两个串,每个串只含有R或者D,要 ...

  4. hdfs源码分析第二弹

    以写文件为例,串联整个流程的源码: FSDataOutputStream out = fs.create(outFile); 1. DistributedFileSystem 继承并实现了FileSy ...

  5. android面试(3)---基本问题

    1.值类型,引用类型? 基本数据类型都是值类型:byte,short,int,long,float,double,char,boolean 其他类型都是引用类型. 引用类型在传入方法是,方法内部对引用 ...

  6. Django之CSS,JS静态文件的配置

    一. 专门创建一个目录放静态文件,即CSS,JS等. 1)先把jquery.min拿过来. 2)新建一个CSS文件放入样式 3)在login.html中引入.css文件 在login.html中引入. ...

  7. 康托展开&康托逆展开 的写法

    康托展开 康托展开解决的是当前序列在全排序的名次的问题. 例如有五个数字组成的数列:1,2,3,4,5 那么1,2,3,4,5就是全排列的第0个[注意从0开始计数] 1,2,3,5,4就是第1个 1, ...

  8. sz与rz命令

    一般来说,linux服务器大多是通过ssh客户端来进行远程的登陆和管理的,使用ssh登陆linux主机以后,如何能够快速的和本地机器进行文件的交互呢,也就是上传和下载文件到服务器和本地:   与ssh ...

  9. Zookeeper(一) zookeeper基础使用

    一.Zookeeper是什么 (安装的是3.4.7) ZooKeeper 是一个分布式的,开放源码的分布式应用程序协调服务,是 Google 的 Chubby 一个开源的实现.它提供了简单原始的功能, ...

  10. bzoj2734:[HNOI2012]集合选数(状压DP)

    菜菜的喵喵题~ 化序列为矩阵!化腐朽为神奇!左上角为1,往右每次*3,往下每次*2,这样子就把问题转化成了在矩阵里选不相邻的数有几种可能. 举个矩阵的例子 1 3 9 27 2 6 18 54 4 1 ...