Servlet 2.5 特性整理

根据 Servlet 的标准的重大变化决定了版本号从 2.4 跳跃到了 2.5
在这个发行的标准中 , 有四个详细的阐明 , 二个对其它文档的改变 , 增加了六个主要变化。
很多大的改变是通过使用 JDK1.5 的新特性带来的。

一个很大的问题就是,为什么 JSR Servlet init() 添加了 annotations ,带来了 init() (@PostConstruct), destroy() (@PreDestroy) 等新方法。 JCP Executive Committee 的成员 Hani Suleiman 在他的 blog 上,描述了他本来希望看到的新特性,但是事实却未能通过。有意思的是, Hani Suleiman 可是 JCP Executive Committee 的成员, JCP Executive Committee 对专家组提交的方案是有最终决定权的。为何 Hani Suleiman 未能让本来应有的一些变化添加到 Servlet 标准里呢?

新的特性包括:
Clarification on Session scope for when pages contain more then one session context
当一个页面包括多个会话上下文时,理清会话的范围
the ability to apply a single filter to many requests and many filters to a single request
提供一个 filter 可以处理多个请求,以及一个请求可以经过多个 filter 的能力
the ability to create multiple mappings to the same Servlet
提供针对相同的 Servlet 的多个映射
Allow the use of alternative HTTP methods with authorization constraints
通过授权限制,允许用户修改 HTTP 方法
Support the use of annotations to inject resources into a servlet
支持利用标注在 Servlet 注入资源
Removal of the restriction on not being able to call setStatus() in error handling
删除针对在错误处理中不能调用 setStatus 的限制
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值