Chapter 4. Programmatic Security

Topics in This Chapter

  • Combining Container-Managed and Programmatic Security
  • Using the isUserInRole method
  • Using the getRemoteUser method
  • Using the getUserPrincipal method
  • Programmatically controlling all aspects of security
  • Using SSL with programmatic security

Chapter 3 (Declarative Security) introduced two fundamental aspects of Web application security:

  1. Preventing unauthorized users from accessing sensitive data. This process involves access restriction (identifying which resources need protection and who should have access to them) and authentication (identifying users to determine if they are one of the authorized ones). Simple authentication involves the user entering a username and password in an HTML ...

Get Core Servlets and JavaServer Pages, Volume 2: Advanced Technologies, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.