background image

Troubleshooting the Secure Converter Example

<< Running the Secure Converter Example | Securing Application Clients >>
<< Running the Secure Converter Example | Securing Application Clients >>

Troubleshooting the Secure Converter Example

Note ­
This step assumes that you have the executable for ant in your path; if not, you will
need to provide the fully qualified path to the ant executable. This command runs the ant
target named all in the build.xml file.
The running application will look like this:
appclient-command-common:
At this point, a system login dialog will display. Enter the user name and password that
correspond to a user in the group user on the Application Server. If the user name and password
are authenticated, the following text displays in the terminal window or command prompt:
appclient-command-common:
[exec] $100.00 is 11531.00 Yen.
[exec] 11531.00 Yen is 81.88 Euro.
Troubleshooting the Secure Converter Application
Problem
: The application displays zero values after authentication, as shown here:
appclient-command-common:
[exec] $100.00 is 0.00 Yen.
[exec] 0.00 Yen is 0.00 Euro.
Solution
: Verify that the user name and password that you entered for authentication match a
user name and password in the Application Server, and that this user is assigned to the group
named user. User names and passwords are case-sensitive. Read
"Adding Users to the
Application Server" on page 781
for more information on adding users to the file realm of the
Application Server.
Discussion: Securing the Duke's Bank Example
The Duke's Bank application is an online banking application. Duke's Bank has two clients: an
application client used by administrators to manage customers and accounts, and a web client
used by customers to access account histories and perform transactions. The clients access the
customer, account, and transaction information maintained in a database through enterprise
beans. The Duke's Bank application demonstrates the way that many of the component
technologies presented in this tutorial (enterprise beans, application clients, and web
components) are applied to provide a simple but functional application.
To secure the Duke's Bank example, the following security mechanisms are used:
Defining security roles
Specifying form-based user authentication for the web client in a security constraint
Enterprise Bean Example Applications
Chapter 29 · Securing Java EE Applications
831