Murach's Java Servlets and JSP (2nd Edition)
How to restrict access to a web resource

This chapter shows how to use container-managed authentication to create a security constraint that restricts access to part of a web site, and it shows how to use authentication to allow selected users to access that part of the web site.

Chapter 17 How to restrict access to a web resource
An introduction to authentication 532
How container-managed authentication works 532
Three types of authentication 534
How to restrict access to web resources 536
How to add a security role 536
How to add a security constraint 536
How to implement a security realm 538
How to implement the UserDatabaseRealm 538
How to implement the JDBCRealm 540
How to implement the DataSourceRealm 544
How to allow access to authorized users 546
How to use basic authentication 546
How to use digest authentication 546
How to use form-based authentication 548
t




Murach's Java Servlets and JSP

Learn more about this book

View the table of contents

Add this book to your cart