10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3. A default login form displays. Enter a user name and password combination that<br />

corresponds to a user that has already been created in the file realm of the Application<br />

Server and has been assigned to the group of user, as discussed in “Adding Authorized Roles<br />

and Users” on page 876.<br />

Basic authentication is case-sensitive for both the user name and password, so enter the user<br />

name and password exactly as defined for the Application Server.<br />

If you entered My_Name as the name and My_Pwd for the password, the server returns the<br />

requested resource if all of the following conditions are met:<br />

■ <strong>The</strong>re is a user defined for the Application Server with the user name of My_Name.<br />

■ <strong>The</strong> user with the user name of My_Name has a password of My_Pwd defined for the<br />

Application Server.<br />

■ <strong>The</strong> user My_Name with the password My_Pwd is assigned to the group of user on the<br />

Application Server.<br />

■ <strong>The</strong> role of helloUser, as defined for the application, is mapped to the group of user,as<br />

defined for the Application Server.<br />

When these conditions are met, and the server has authenticated the user, the application<br />

will display as shown in Figure 30–9.<br />

4. Enter your name and click the Submit button. Because you have already been authorized,<br />

the name you enter in this step does not have any limitations. You have unlimited access to<br />

the application now.<br />

<strong>The</strong> application responds by saying “Hello” to you, as shown in Figure 30–10.<br />

FIGURE 30–9 Running the Application<br />

Examples: SecuringWeb Applications<br />

Chapter 30 • SecuringWeb Applications 879

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!