A Quick Tour of Java Access Control Features

We first look at some of the Java access control features in action with help of a number of examples, each example building upon the previous one. The source and configuration files for the example programs can be found in the src\jsbook\ch5 subdirectory of JSTK installation. The idea is to get a feel for these features, without getting overwhelmed by the details.

Let us start the discussion with DisplayFile.java of the first example. This file can be found within the ex1 subdirectory within src\jsbook\ch5, the directory for the first example. This program takes a filename as a command line argument and displays its contents on the screen.

Listing 5-1a. Displaying contents of a file
 // File: ex1\DisplayFile.java ...

Get J2EE™ Security for Servlets, EJBs and Web Services: Applying Theory and Standards to Practice 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.