servlet,filter,listener


Filtering Requests and Responses

A filter is an object that can transform the header and content (orboth) of a request or response. Filters differ from web components in thatfilters usually do not themselves create a response. Instead, a filter provides functionality thatcan be “attached” to any kind of web resource. Consequently, a filter shouldnot have any dependencies on a web resource for which it is actingas a filter; this way, it can be composed with more thanone type of web resource.

What Is a Servlet?

A servlet is a Java programming language class used to extend thecapabilities of servers that host applications accessed by means of a request-response programming model.Although servlets can respond to any type of request, they are commonly usedto extend the applications hosted by web servers. For such applications, Java Servlettechnology defines HTTP-specific servlet classes.

The javax.servlet and javax.servlet.http packages provide interfaces and classes for writing servlets.All servlets must implement the Servlet interface, which defines lifecycle methods. When implementing ageneric service, you can use or extend the GenericServlet class provided with the JavaServlet API. The HttpServlet class provides methods, such as doGet and doPost, for handlingHTTP-specific services.

参照:http://docs.oracle.com/javaee/6/tutorial/doc/bnafe.html

http://docs.oracle.com/cd/B32110_01/web.1013/b28959/toc.htm

因为内容比较多,以后留着看


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值