<%@ 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. Spring 中常用注解原理剖析

    前言 Spring 框架核心组件之一是 IOC,IOC 则管理 Bean 的创建和 Bean 之间的依赖注入,对于 Bean 的创建可以通过在 XML 里面使用 <bean/> 标签来配置 ...

  2. Android手机Fiddler真机抓包

    Fiddler是最强大最好用的Web调试工具之一,它能记录所有客户端和服务器的http和https请求,允许用户监视,设置断点,甚至修改输入输出数据,Fiddler包含了一个强大的基于事件脚本的子系统 ...

  3. 【数据库】MySQL 复制表结构

    介绍 有时候我们需要原封不动的复制一张表的表结构来生成一张新表,MYSQL提供了两种便捷的方法. 例: CREATE TABLE tb_base( id INT NOT NULL PRIMARY KE ...

  4. MySQL二进制安装部署

    #使用二进制包安装mysql -linux-glibc2.-x86_64.tar.gz /data/ -linux-glibc2.-x86_64.tar.gz -C /data/ -linux-gli ...

  5. 导出ORACLE表结构到SQL语句(含CLOB)

      转自:http://blog.itpub.net/84738/viewspace-442854/ 先用exp导出空表 exp username/password rows=n file=expor ...

  6. 【JavaScript】事件

    一.前言         继续上一章的内容,继续今天的Js学习. 二.内容         事件处理程序 事件就是用户或浏览器自身执行的某种动作.而响应某个事件的函数就叫做事件处理程序 //HTML事 ...

  7. 解决:warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;找到 MSIL .netmodule 或使用 /GL 编译的模块;正在。。;LINK : warning LNK4075: 忽略“/INCREMENTAL”(由于“/LTCG”规范)

    原文链接地址:https://www.cnblogs.com/qrlozte/p/4844411.html 参考资料: http://blog.csdn.net/laogaoav/article/de ...

  8. Codeforces Round #207 (Div. 2)A B C E 水 思路 set 恶心分类

    A. Group of Students time limit per test 1 second memory limit per test 256 megabytes input standard ...

  9. 「Django」rest_framework学习系列-节流控制

    1.节流自定义类: import time from api import models VISIT_RECORD = {} class VisitThrottle(BaseThrottle): #设 ...

  10. sessionStorage和localStorage的使用

    不管是sessionStorage,还是localStorage,可使用的API都相同,常用的有如下几个(以localStorage为例): 保存数据:localStorage.setItem(key ...