Protecting a Resource with a MemoryRealm
To actually see how a MemoryRealm works, let’s create a realm that protects a sample web application named /onjava. At this point, if you have not already done so, take a look at my previous OnJava article, Deploying Web Applications to Tomcat. We will be using the /onjava web application from it. The steps involved in setting up a new MemoryRealm are described in the following list. (continue reading…)