Export to GitHub

bounding - JSR245.wiki


JSP2.2 EL2.2 - JSR245

JSP 2.1

JSP九大内置对象

  • request
  • response
  • page
  • pageContext
  • session
  • application
  • out
  • config
  • exception

    关于九大内置对象,在基于JSP的Model2模型的应用的中很少会直接用到。

JSP的组成元素

Directive Elements

  • taglib指令,引入标签库的语法
  • include指令,include其它jsp页面的语法,和jsp:include的区别
  • page指令的相关属性如import

Declare Elements

在基于JSP的Model1和Model2中都很少使用

Scriptlet Elements

脚本元素包含三种: * Declaration

<%! int x = 2; %> * Expression <%=x%> * Scriptlet <%x=2;%>

在基于JSP的Model1和Model2中都很少使用

Action Element

JSP标准动作 * 和JavaBean相关的action element。jsp:useBean,jsp:getProperty,jsp:setProperty的使用 * jsp:fallback,jsp:forward,jsp:include,jsp:params,jsp:param,jsp:plugin的使用 在基于JSP的Model2模型的应用的中action element很少会直接用到

Static Content

静态的HTML内容。当然包括静态的注释<!-- -->

Comment Element

<%-- -- %>

Customed JSP Tag

EL

see tomcat examples webapp

EL Implicit Object

  • pageContext
  • pageScope
  • requestScope
  • sessionScope
  • applicationScope
  • param
  • paramValues
  • header
  • headerValues
  • cookie

    上面的隐含对象在JSP2.0中可以直接使用。例如:${param.username}${paramValues.loves[1]}

Arithemetic Operators

  • +
  • -
  • *
  • / or div
  • % or mod

comparison operators

  • == or eq
  • != or ne
  • < or lt
  • > or gt
  • <= or le
  • >= or ge

Logical Operators

  • && or and
  • || or or
  • ! or not

. and [] Operators

  • . and [] 通用
  • 在不能用.的时候,比如存取的属性名称中包含特殊字符,就只能用[]

EL Functions

  • see jstl functions libaray
  • customed el functions