<%@ 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. Delphi定位TDataSet数据集最后一条记录

    dst_temp.last ;//最后一条dst_temp.first ;//第一条dst_temp.next ;//下一条dst_temp.prior;//上一条

  2. 第111天:Ajax之jQuery实现方法

    由于jQuery中的Ajax方法是用了内置的deferred模块,是Promise模式的一种实现,而我们这里没有讲过,所以我们就不使用这一模式啦. 我们只定义一个Ajax方法,他可以简单的get,po ...

  3. 【Python】Python的time和datetime模块

    time 常用的有time.time()和time.sleep()函数. import time print(time.time()) 1499305554.3239055 上面的浮点数称为UNIX纪 ...

  4. BZOJ4890 Tjoi2017城市

    显然删掉的边肯定是直径上的边.考虑枚举删哪一条.然后考虑怎么连.显然新边应该满足其两端点在各自树中作为根能使树深度最小.只要线性求出这个东西就可以了,这与求树的重心的过程类似. #include< ...

  5. Linux环境安装.NET运行环境

    Linux环境安装.NET运行环境 Linux环境安装.NET运行环境 1. 构建编译环境: (1) sudo apt-get install build-essential (2) sudo apt ...

  6. 解题:USACO06DEC Milk Patterns

    题面 初见SA 用了一个常见的按$height$分组的操作:二分答案,然后按$height$分组,遇到一个$height$小于$mid$的就丢进下一组并更新答案,如果最多的那组不少于$k$个说明可行 ...

  7. Howto run google-chrome as root

    Just want to add a permanent solution to the problem: 1. Open google-chrome located in /usr/bin with ...

  8. Spring MVC POJO传参方式

    有两POJO类 Address.java package com.proc; public class Address { private String province; private Strin ...

  9. python学习(十五) 内建模块学习

    介绍python的几个內建模块,原文链接 1 python的时间模块datetime 取现在时间 from datetime import datetime now = datetime.now() ...

  10. apk签名验证机制

    声明: 1.本帖转载自:http://riusksk.blogbus.com/logs/272154406.html,仅供自用,勿喷 2.欢迎交流学习 签名后的APK,在/META-INF目录下会生成 ...