- Java EE 8 Design Patterns and Best Practices
- Rhuan Rocha Jo?o Purifica??o
- 149字
- 2021-07-23 16:54:52
Implementing the intercepting filter pattern using Java EE 8
To implement this pattern with the best practices of Java EE 8, we will use the servlet filter from the Java Servlet specification. With the servlet filter, we can create an ordered request interceptor to treat the requests and responses. These interceptors are mapped by the URL pattern or servlet name. The servlet filter can be configured with XML (on web.xml) or annotation. In our case, we will imagine that we want to create a log of all the requests that are sent to the server. We will also have two filters—one to log the access time and another to log the information about the browser that the client is using. To log the access time, we will create a filter called LogAccessFilter, and to log the browser information we will create a filter called LogBrowserFilter.
- Kubernetes修煉手冊
- Haskell Financial Data Modeling and Predictive Analytics
- Extending Puppet
- vSphere Virtual Machine Management
- SharePoint 2013 WCM Advanced Cookbook
- Windows Vista融會貫通
- AWS Development Essentials
- Learning Magento 2 Administration
- 從實踐中學習Kali Linux無線網絡滲透測試
- 深入淺出Node.js
- Linux服務器配置與管理
- Advanced TypeScript Programming Projects
- Cassandra 3.x High Availability(Second Edition)
- Windows 7實戰從入門到精通(超值版)
- 鴻蒙操作系統設計原理與架構