上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 82 下一页
摘要: XML标签库JSTL提供了操作xml文件的标签库,使用xml标签库可以省去使用Dom和SAX标签库的繁琐,能轻松的读取xml文件的内容。9.5.1 XML核心标签库1.<x:parse>标签<x:parse/>标签用来解析指定的xml文件。【语法1】:<x:parse doc=”xmlDocument”{var=”name”[scope=”page|request|session|application”]|varDom=”name”[scope=”page|request|session|application”]}systemId=”systemId”filt 阅读全文
posted @ 2012-01-30 17:15 greencolor 阅读(423) 评论(0) 推荐(0) 编辑
摘要: SQL标签库JSTL提供了与数据库相关操作的标签,可以直接从页面上实现数据库操作的功能,在开发小型网站是可以很方便的实现数据的读取和操作。本章将详细介绍这些标签的功能和使用方法。SQL标签库从功能上可以划分为两类:设置数据源标签、SQL指令标签。引入SQL标签库的指令代码为:<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>9.4.1 设置数据源使用<sql:setDataSource>标签可以实现对数据源的配置。【语法1】:直接使用已经存在的数据源。 阅读全文
posted @ 2012-01-30 17:14 greencolor 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 所有标签:Tags fmt:requestEncoding fmt:setLocale fmt:timeZone fmt:setTimeZone fmt:bundle fmt:setBundle fmt:message fmt:param fmt:formatNumber fmt:parseNumber fmt:formatDate fmt:parseDate <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>jstl fmt 函数大全主要功能格式化日期格式(20 阅读全文
posted @ 2012-01-30 16:53 greencolor 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 9. <c:forEach> 库 :Core(核心库) URI : http://java.sun.com/jsp/jstl/core 前缀 : c 描述 : <c:forEach>动作将其体反复计算固定次数,或者针对一个集合中的每个元素分别计算一次体。当前元素(如果未指定集合则为当前索引)和迭代状态可以通过嵌套变量提供给体中的动作元素。 此动作接受属性表中所列的类型集合。当前元素的类型即为底层集合的类型,仅有两个例外。对于一个基本类型的数组,当前元素将作为相应包装类(Integer、Float等等)的一个实例提供。对于一个java.util.Map,当前元素则作为一个 阅读全文
posted @ 2012-01-30 16:25 greencolor 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 从JSP 1.1规范开始,JSP就支持在JSP中使用自定义标签了,自定义标签的广泛使用造成了程序员重复定义,这样就促成了JSTL(JavaServer Pages Standard Tag Library)的诞生。作者:杨通杆(http://hexun.com/yangtonggan/default.html)JSTL简介JSTL是一个不断完善的开放源代码的JSP标签库,是由apache的jakarta小组来维护的。JSTL只能运行在支持JSP1.2和Servlet2.3规范的容器上,如tomcat 4.x。但是在即将推出的JSP 2.0中是作为标准支持的。 JSTL目前的最新版本为1.02, 阅读全文
posted @ 2012-01-30 16:20 greencolor 阅读(507) 评论(0) 推荐(0) 编辑
摘要: JavaServer Pages Standard Tag Library 1.1 Tag ReferenceTag LibrariesJSTL coreJSTL 1.1 core libraryJSTL fmtJSTL 1.1 i18n-capable formatting libraryJSTL sqlJSTL 1.1 sql libraryJSTL XMLJSTL 1.1 XML libraryJSTL functionsJSTL 1.1 functions library 阅读全文
posted @ 2012-01-30 16:07 greencolor 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 1. attribute:设置和Action关联的ActionForm Bean在request和session范围内的key。如:Form Bean存在于request范围内,此项设为“myBenas”,则在request.getAttribute("myBenas")就可以返回该 Bean的实例。 2. classsName:和action元素对应的配置元素,默认为:org.apache.struts.action.ActionMapping. 3. forward:转发的URL路径。 4. include:指定包含的URL路径。 5. input:输入表单的URL路径 阅读全文
posted @ 2012-01-29 23:08 greencolor 阅读(185) 评论(0) 推荐(0) 编辑
摘要: <HTML><BODY><FORM METHOD=POST ACTION="SaveName.jsp">What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20><P><INPUT TYPE=SUBMIT></FORM></BODY></HTML>The target of the form is "SaveName.jsp", which saves the user's n 阅读全文
posted @ 2012-01-24 01:54 greencolor 阅读(263) 评论(0) 推荐(0) 编辑
摘要: <%@ page import="java.util.*" %><HTML><BODY><%! Date theDate = new Date(); Date getDate() { System.out.println( "In getDate() method" ); return theDate; }%>Hello! The time is now <%= getDate() %></BODY></HTML>===========================To 阅读全文
posted @ 2012-01-24 01:31 greencolor 阅读(204) 评论(0) 推荐(0) 编辑
摘要: <%@ page import="java.util.*" %><HTML><BODY><% System.out.println( "Evaluating date now" ); Date date = new Date();%>Hello! The time is now <%= date %></BODY></HTML>=======================The first line in the above example is called a &q 阅读全文
posted @ 2012-01-24 01:08 greencolor 阅读(473) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 82 下一页