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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.