jee
This is an old revision of the document!
Table of Contents
Advanced Servlets
This week covers advanced aspects of webapp development. They include declarative security, filters and dynamic scheduling, listeners and the webapp life-cycle, and design patterns.
Declarative Security
- Why: Authentication and encryption without programming.
- What: Designate pages that must be secured.
- How: Define roles and users in conf/tomcat-users.xml; select the needed security and the URLs to secure in web.xml.
- Example: add a login to an existing webapp
Filters
- Why: Refactor the webapp without recompiling
- What: Intercept the flow anywhere between the client, the servlets, and the JSPs on the way in or out.
- How: Designate the interception points in web.xml; implement Filter; read and optionally modify the request or response; continue down the pipeline or abort.
- Example: add a new validation; support a new protocol; log; compress; etc.
Declarative Security
- Why: Authentication and encryption without programming.
To Do
- See the web_security.xml file in the Resource Directory under jee.
- See the web_filter.xml file and PrimeFilter.java“ in the Resource Directory under jee. Look at the
labtest
directory in the Resource Directory. * Look atCUSTdemo
in the Resource Directory underjsp
. * Read Chapter 6 up to and excluding Section 6.7. * Read Chapter 8, Section 8.6 and 8.7.
jee.1225916651.txt.gz · Last modified: 2008/11/05 20:24 by roumani