`
liss
  • 浏览: 842696 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

JSP 2.0 XML Cheat Sheet

阅读更多

JSP 2.0 XML Cheat Sheet

Copyright (c) 2005 NDP Software. Some Rights Reserved.

General

  • <%@ <jsp:directive.[directiveName]...
  • <%! <jsp:declaration> int i=0; </jsp:declaration>
  • <%= <jsp:expression> myVar.getProp() </jsp:expression>
  • <% <jsp:scriptlet> if (... </jsp:scriptlet>

scope is page|request|session|application

<jsp:root version="1.2|2.0" [ xmlns:taglibPrefix="URI" ]+ ... xmlns="http://www.w3c.org/1999/xhtml" xmlns:jsp ="http://java.sun.com/JSP/Page"

JSTL

xmlns:c ="http://java.sun.com/jsp/jstl/core"

<c:url value="" var="var" scope="SCOPE" ... <c:param <c:out value=" " escapeXml="true"

<c:if test="" <c:choose <c:when test="" <c:otherwise <c:forEach var="" varStatus="" items="" begin="startIndex" end="" step=""

<c:forTokens var="" varStatus="" items="" delims="" begin="startIndex" end="" step=""

<c:catch var=""

<c:set value="or element body" var="" scope="SCOPE" target="" property="" <c:remove var="" scope=""

<c:import url="" var="" scope="SCOPE" charEncoding="" ... <c:param name="" value="" <c:redirect ... <c:param name="" value=""

xmlns:fmt ="http://java.sun.com/jsp/jstl/fmt" <fmt:requestEncoding value="encoding name"

<fmt:message ... <fmt:param ... TBD <fmt:bundle basename="" prefix="" <fmt:setBundle basename="" var="" scope="SCOPE" value="" <fmt:formatNumber ... TBD

<fmt:formatDate var="" scope="SCOPE" value="" pattern="see java.text.SimpleDateFormat" type="date|time|both" dateStyle="default|short|medium|long|full" timeStyle="default|short|medium|long|full" timeZone=""

<fmt:timeZone value="" <fmt:setTimeZone value="" var="" scope="SCOPE" value=""

<fmt:setLocale value="" var="" scope="SCOPE" value=""

<fmt:parseDate

<fmt:parseNumber

Tag or JSP Files

<jsp:directive.include file="a page relative or context relative URI path for the file to include"

<jsp:include page="page- or context-relative URI" flush="false" <jsp:param name="" value=""

<jsp:element name="" <jsp:attribute name="" trim="true" (body is value) <jsp:body (required when <jsp:attribute is used) (It's not possible have conditional attributes using these tags.)

<jsp:output omit-xml-declaration="true |yes|false|no" doctype-root-element="" doctype-public="publicID" doctype-system="systemID"

<jsp:getProperty name="bean variable name" property=""

<jsp:setProperty name="bean variable name" property="*|names" param="name of request parameter" value=""

<jsp:useBean id="" class="" beanName="" type="" scope="SCOPE"

<jsp:text preserves whitespace

<jsp:plugin ... <jsp:fallback <jsp:params <jsp:param name="" value=""

Tag Files Only

<jsp:directive.tag description="" example="" body-content="empty|scriptless |tagdependent" dynamic-attributes="the name of the variable to hold dynamic attributes" import="" pageEncoding="ISO-8859-1"

<jsp:directive.attribute name="" description="" required="true|false " fragment="true|false " rtexprvalue="true |false" type="String classes and interfaces (no primitive types)"

<jsp:directive.variable alias="name of the local page scope variable the tag file uses to hold the value" name-from-attribute="page-scope variable name receiving value" declare="true (false to prevent export of variable)" description="" name-given="name of the invoking page's variable used to export the value" scope="NESTED |AT_BEGIN|AT_END" variable-class="class or interface"

<jsp:doBody var="" varReader="" scope="SCOPE"

<jsp:invoke fragment="attribute that defines the fragment" scope="SCOPE" var="" varReader=""

Page Only

<jsp:directive.page autoFlush="true" buffer="8kb" contentType="mimeType and encoding UTF-8 " errorPage="page or context relative path" extends="class name" import="package list" isErrorPage="false" isThreadSafe="true" pageEncoding="encoding of JSP page file and default contentType encoding" session="true"

<!-- p class="code">&lt;jsp:root version="2.0" (deprecated) </p-->

<jsp:forward page="page or context relative path". <jsp:param name="" value=""

Scriptlets

javax.servlet.jsp.PageContext pageContext
Page findAttribute, getAttribute, getAttributesScope, getAttributeNamesInScope, setAttribute
javax.servlet.jsp.JspWriter out
Page clear, clearBuffer, flush, getBufferSize, getRemaining
javax.servlet.ServletConfig config
Page getInitParameter, getInitParameterNames
java.lang.Throwable exception
Page getMessage, getLocalizedMessage, printStackTrace, toString
java.lang.Object page
Page  
javax.servlet.ServletResponse response
Page  
javax.servlet.ServletRequest request
Request getAttribute, getParameter, getParameterNames, getParameterValues, setAttribute
javax.servlet.http.HttpSession session
Session getAttribute, getId, setAttribute
javax.servlet.ServletContext application
Application getAttribute, getMimeType, getRealPath, setAttribute

EL

operations
and | &amp;&amp; | or | || | '+' | '-' | * | / | div | % | mod | gt | lt | ge | le | ==| eq | ne {'-'| ! | not | empty}
pageContext
The context for the JSP page. Provides access to various objects, including servletContext, session, request, and response.
pageScope
Maps page-scoped variable names to their values.
requestScope
Maps request-scoped variable names to their values.
sessionScope
Maps session-scoped variable names to their values.
applicationScope
Maps application-scoped variable names to their values.
param
Maps a request parameter to a single String parameter value (obtained by calling ServletReqwuest.getParameter(String name)).
paramValues
Maps a request parameter name to an array of String values for that parameter name (obtained by calling ServletRequest.getParameterValues(String name)).
header
Maps a request header name to a single String header value (obtained by calling ServletRequest.getHeader(String name)).
headerValues
Maps a request header name to an array of String values for that header (obtained by calling ServletRequest.getHeaders(String)).
cookie
Maps a cookie name to a single Cookie object. Cookies are retrieved according to the semantics of HttpServletRequest.getCookies(). If same name is shared by multiple cookies, an implementation must use the first encountered in the array of Cookie objects returned by the getCookies() method. However, the ordering of cookies currently unsspecified in the Servlet specification.
initParam
Maps a context initialization parameter name to a String parameter value (obtained by calling ServletContext.getInitparameter(String name)).
  • boolean fn:contains(string, substring)
  • boolean fn:containsIgnoreCase(string, substring)
  • boolean fn:startsWith(string, prefix)
  • boolean fn:endsWith(string, suffix)
  • String[] fn:split(string, separator)
  • String fn:substring(string, begin, end)
  • String fn:substringBefore(string, substring)
  • String fn:substringAfter(string, substring)
  • String fn:replace(string, before, after)
  • String fn:toLowerCase(string)
  • String fn:toUpperCase(string)
  • String fn:trim(string)
  • int fn:indexOf(string, suffix)
  • int fn:length(String or Collection)
  • String fn:join(String[], separator)
  • String fn:escapeXml(string)
分享到:
评论

相关推荐

    JSP_cheatsheet jsp 小抄

    ### JSP_cheatsheet jsp 小抄 #### 概述 JSP(JavaServer Pages)是一种基于Java的服务器端技术,用于创建动态网页。它将静态内容与动态内容混合在一起,通过内置的对象处理用户输入并产生响应。JSP_cheatsheet是一...

    CheatSheet for Mac

    "CheatSheet for Mac"就是一款专为Mac用户设计的快捷键查看工具,它能够帮助用户快速了解并记忆系统及应用中的快捷键组合,提升操作效率。这款软件的版本号是1.0.1,且提供免费下载,使得更多用户得以轻松享受便捷的...

    cheatsheet for mac

    标题中的“cheatsheet for mac”指的是Mac操作系统中的一种实用工具,它可以帮助用户快速了解并记忆各种应用程序的快捷键。快捷键是提高工作效率的关键,尤其是在使用计算机时,熟练掌握快捷键能够大大提升工作速度...

    CheatSheet_1.2.9 for MacOS

    《CheatSheet_1.2.9 for MacOS:掌握Mac系统的高效快捷键操作》 在数字化办公的时代,熟练掌握计算机快捷键是提升工作效率的关键。针对Mac操作系统,有一款名为"CheatSheet"的实用工具,其版本1.2.9特别为Mac用户...

    CheatSheet_1.2.7 最新中文版

    标题中的"CheatSheet_1.2.7 最新中文版"指的是CheatSheet这款软件的最新版本1.2.7,它是一款专为Mac操作系统设计的实用工具。CheatSheet的主要功能是帮助用户快速掌握并记忆各种应用程序的快捷键,从而提高在Mac系统...

    CheatSheet_1.3.1

    《CheatSheet_1.3.1:提升软件使用效率的快捷键指南》 在数字化时代,高效使用各种软件已经成为日常工作中不可或缺的技能。而掌握软件的快捷键,无疑是提升工作效率的一大法宝。CheatSheet_1.3.1,这款实用工具,...

    CheatSheet.app.zip

    标题中的"CheatSheet.app.zip"表明这是一个用于Mac操作系统的应用程序,它被压缩成ZIP格式以方便下载和分发。这个应用程序的主要功能是提供一个快捷键的清单,帮助用户快速了解和使用各种系统及应用的快捷键。 在...

    clojure-cheatsheet, 用于Emacs的Clojure Cheatsheet.zip

    clojure-cheatsheet, 用于Emacs的Clojure Cheatsheet 用于Emacs的难以置信方便的 Clojure Cheatsheet,更新为 Clojure,打包成简单,快速,可以搜索的离线形式: 状态准备使用基于 Clojure 1.7.0.安装如果你连接到 ...

    conda cheat sheet v4.6.zip

    conda cheat sheet,4.6.1 版本。有了这份 conda cheat sheet 再配合 help 命令,基本能解决 conda 使用中的大部分问题。这份 cheat sheet 从官网搬运,上传到 CSDN 资源主要是为了网络环境不太理想的 Python 学习者...

    markdown-cheatsheet, 用于 Github README.md的Markdown Cheatsheet.zip

    markdown-cheatsheet, 用于 Github README.md的Markdown Cheatsheet Markdown Heading HeadingMarkup : # Heading 1 #-OR-Markup : ============= (below H1 text)标题 2Mark

    Python 3 Cheat Sheet

    Python 3 Cheat Sheet 2012-2013 - Laurent Pointal Mémento v1.2.1bis Official Python documentation on http://docs.python.o

    CheatSheet_1.3.4.zip

    CheatSheet for Mac是专门用来查看应用程序快捷键的工具,安装好cheatsheet软件后,在软件界面长按Command键即可快速查看快捷键列表,非常的便捷,想要了解更多关于软件的快捷键,那就赶紧试试cheatsheet for mac吧...

    opencv_cheatsheet

    opencv_cheatsheet

    x86 assembly cheatsheet

    x86 assembly cheatsheet

    Machine Learning Super VIP Cheatsheet

    Machine Learning Super VIP Cheatsheet

    R cheatsheet advanced

    为了提高工作效率和编写更流畅的代码,开发者们常常会使用一些快捷方式或者技巧,这些内容被整理成“cheatsheet”(速查表),以供快速查阅和参考。这次我们讨论的“R cheatsheet advanced”涉及到在使用R语言进行...

    RAPIDS cheatsheet.pdf

    在RAPIDS的cheatsheet中,通常会包括以下几个方面的知识点: 1. 数据操作基础:RAPIDS利用 cudf 库来执行类似Pandas的DataFrame操作。例如,`gdf.sort_values('mpg')`和`gdf.sort_values('mpg', ascending=False)`...

    第18章 备忘单(CheatSheet)

    第18章 备忘单(CheatSheet),swt,eclipse插件开发学习笔记 第18章 备忘单(CheatSheet),swt,eclipse插件开发学习笔记 第18章 备忘单(CheatSheet),swt,eclipse插件开发学习笔记 第18章 备忘单(CheatSheet...

    CSS3 CHM版手册和 CSS3 Cheat Sheet打包

    **CSS3 CHM版手册和CSS3 Cheat Sheet打包**提供了全面深入学习CSS3的重要资源,这两份资料旨在帮助开发者快速掌握和应用CSS3的各种新特性。CHM版手册和Cheat Sheet结合使用,能有效提升理解和实践能力。 **CSS3 CHM...

    Vim cheatsheet中文版 绝对珍藏版

    Vim cheatsheet中文版 绝对珍藏版 很不错的

Global site tag (gtag.js) - Google Analytics