JAAS example
---------------

Setting up the client and server with J2EE SDK for the JAAS example is
more difficult than for most other examples. Please be prepared to
perform some extra configuration steps.

- This example requires the client application container (appclient)
  for the client to run; a standalone client will not forward the
  collected user credentials.

- Moreover, client and server must reside on different physical
  hosts for the appclient container to recognize the need to send
  credentials.

Prerequisite steps:

- edit the file "assemble\sun-acc.xml" in this example directory
  before building the client jar. Replace "host" with your app
  server host name.

- set up user information in the server using the Application Server's
  AdminConsole:

  1) Select the "fileRealm" from the Security->Realms panel
  2) make sure that there is a property "jaas-context" with value
     "fileRealm" on that panel.
  3) Click on "Manage Users" to create a user "TestUser" and password
     "test". Then click on the "save" button. If you want a different
     user name, you also need to modify the role mapping in the
     descriptor file "sun-application.xml"

To build, deploy, and run this sample, execute

1) asant all

To assemble the client jar file, excute

2) asant client_jar 

To run the JAAS client, execute the start script:

3) start_client.bat

You may see a number of "ClassNotFound" exceptions, which you can
ignore. Eventually, you will be prompted for a user name and
password. Enter "TestUser" and "test", and the example should run
successfully, emitting the usual "Hello World" message.