posted 20 years ago
One way to handle this could be to assign each user a role. Each page requires certain roles in order to be accessed. For example, admin pages require users to have the "ADMININSTRATOR" role.
There are lots of ways to keep track of which roles each page requires. One of the simplest might be a Map in the application context that uses the URI of the page as a key to a list of required roles (or a single role if your layout is that simple). This could be loaded by a context listener at app startup, perhaps from a properties file or an XML file.
If a role-based approach isn't appropriate, then there may be other ways. More info on how your app operates and is organized would be necessary.