?1?? public abstract class TemplateFilter implements javax.servlet.Filter {
2???? private FilterConfig filterConfig;
3???? public void init(FilterConfig filterConfig) throws ServletException {
4?????? this.filterConfig = filterConfig;
5???? }
7???? protected FilterConfig getFilterConfig()??? {
8?????? return filterConfig;
9???? }
11??? public void doFilter(ServletRequest request,
12??????? ServletResponse response, FilterChain chain)
13??????? throws IOException, ServletException {
14
15?????? // Preprocessing for each filter
16?????? doPreProcessing(request, response);
17
18?????? // Pass control to the next filter in the chain or
19?????? // to the target resource. This method invocation is what logically
20?????? // demarcates preprocessing from postprocessing.
21?????? chain.doFilter(request, response);
22
23?????? // Post-processing for each filter
24?????? doPostProcessing(request, response);
25???? }
26???? public abstract void doPreProcessing(ServletRequest request,
27???????? ServletResponse response) { }
28
29???? public abstract void doPostProcessing(ServletRequest request,
30???????? ServletResponse response) { }
32???? public void destroy() { }
33? }
|
相关推荐
Core J2EE Patterns 2nd Editioin
3. **J2EE(Java 2 Platform, Enterprise Edition)**:J2EE是Java企业级应用的开发框架,包含了一系列的API和服务,如Servlet、JSP、JMS、JTA等。书中可能讲解了如何利用这些组件来构建分布式系统,以及如何处理...
《Core J2EE Patterns: Best Practices and Design Strategies》第二版是一本面向Java 2 Platform, Enterprise Edition (J2EE) 开发者的专业指南。本书由Deepak Alur、John Crupi和Dan Malks三位资深架构师编写,...
The book of CoreJ2EE_Patterns2nd is very good book to study J2EE,it contains both pdf and chm formats.
"轻量级 J2EE 企业应用实战 : 整合开发"、"C#.NET编程 -NHibernate资料整合"、"J2EE性能测试"、"More.Java.Pitfalls中文版"、"J2EE1.4 编程指南"、"J2EE应用与BEA.WebLogic.Server第2版"、"循序渐进 Java 2 教程"、...