Java

本类阅读TOP10

·使用MyEclipse开发Struts框架的Hello World!(录像1)
·hibernate配置笔记
·AOP编程入门--Java篇
·linux下Tomcat 5.0.20 与 Apache 2 安装/集成/配置
·在win2003下整合了整合Tomcat5.5+ apache_2.0.53+ mod_jk_2.0.47.dll
·构建Linux下IDE环境--Eclipse篇
·Jsp 连接 mySQL、Oracle 数据库备忘(Windows平台)
·ASP、JSP、PHP 三种技术比较
·Tomcat5.5.9的安装配置
·AWT GUI 设计笔记(二)

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
SCWCD1.4的资料

作者:未知 来源:月光软件站 加入时间:2005-5-13 月光软件站

开始复习的是080。

看了几位前辈的帖子,才知道081和080有很大的不同。

以下为增加的两部分,为EL和JSTL。

Chapter 7. Building JSP Pages Using the Expression Language (EL)

Given a scenario(方案;情况;概要), write EL code that accesses the following implicit variables including: pageScope, requestScope, sessionScope, and applicationScope, param and paramValues, header and headerValues, cookie, initParam and pageContext.

There are several implicit objects that are available to EL expressions used in JSP pages. These objects are always available under these names(讲的是EL的隐含对象和简单的说明)

然后举了几个例子,有EL的.运算和[]运算。

Chapter 9. Building JSP Pages Using Tag Libraries

For a custom tag library or a library of Tag Files, create the 'taglib' directive for a JSP page.

The set of significant(有意义的, 重大的, 重要的) tags a JSP container interprets (解释, 说明)can be extended through a tag library.

The taglib directive in a JSP page declares that the page uses a tag library, uniquely(独特地,唯一地,珍奇地) identifies the tag library using a URI and associates(使发生联系, 使联合) a tag prefix that will distinguish usage of the actions in the library.

If a JSP container implementation cannot locate a tag library description, a fatal translation error shall result.

It is a fatal translation error for the taglib directive to appear after actions or functions using the prefix.

In the following example, a tag library is introduced and made available to this page using the super prefix; no other tag libraries should be introduced in this page using this prefix. In this particular case, we assume the tag library includes a doMagic element type, which is used within the page.

JSTL增加的部分:

Given a design goal, use an appropriate(适当的) JSP Standard Tag Library (JSTL v1.1) tag from the "core" tag library.

The center of JSTL is the core taglib. This can be split into five areas:

  1. General purpose

  2. Variables support

  3. Conditional

  4. Iterator

  5. URL Related

To use the core library, use the following directive:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
The prefix attribute specifies(指定,规定,确定) the prefix used in the tag name for a particular library. For example, the core library includes a tag named out. When combined with a prefix of c, the full tag would be <c:out>. You are free to use any prefix you like, but you must use different prefixes for each of the four standard tag libraries.

You must also put the corresponding(相应的) .tld file for each tag library in your /WEB-INF directory and use the taglib element in your web.xml file to include the tag library:

<taglib>
    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
    <taglib-location>/WEB-INF/tld/core.tld</taglib-location>
</taglib>

General purpose tags.


相关文章

相关软件