javaserver pages 碎片(1)

1.
< c:if  test ="${param['locale'] != null}" >
  
< fmt:setLocale  value ="${param['locale']}"  scope ="session"   />
</ c:if >


2.
<fmt:setBundle/>设置全局资源绑定
<fmt:Bundle>
    <fmt:message key=""/>
</fmt:Bundle>

3.
The JSP expression language defines a set of implicit objects:

* pageContext: The context for the JSP page. Provides access to various objects including:
  o servletContext: The context for the JSP page's servlet and any web components contained in the same application. See Accessing the Web Context.
  o session: The session object for the client. See Maintaining Client State.
  o request: The request triggering the execution of the JSP page. See Getting Information from Requests.
  o response: The response returned by the JSP page. See Constructing Responses.

In addition, several implicit objects are available that allow easy access to the following objects:

* param: Maps a request parameter name to a single value
* paramValues: Maps a request parameter name to an array of values
* header: Maps a request header name to a single value
* headerValues: Maps a request header name to an array of values
* cookie: Maps a cookie name to a single cookie
* initParam: Maps a context initialization parameter name to a single value

Finally, there are objects that allow access to the various scoped variables described in Using Scope Objects.

* 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

4.
# Core: http://java.sun.com/jsp/jstl/core
# XML: http://java.sun.com/jsp/jstl/xml
# Internationalization: http://java.sun.com/jsp/jstl/fmt
# SQL: http://java.sun.com/jsp/jstl/sql
# Functions: http://java.sun.com/jsp/jstl/functions
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值