This simple example is based heavily on the Hello User application in the Java EE Tutorial.

Get the example. Either:

  • Use the NetBeans project
    • Download the NetBeans project zip file
    • Expand the zip file into a directory
    • Open the directory in NetBeans as a project
    • Right-click on the project and choose Build Project
    • Note the location of the build WAR file in the output tab

or

Then

  • Deploy the application using asadmin deploy --path hello1-war-path

You should see Duke waving to you and asking for your name. Enter your name and press Enter or click on Submit and Duke will greet you personally.