The Java EE 6 Tutorial, Volume I

ProcedureRunning the simplegreeting Example

  1. In a web browser, type the following URL:


    http://localhost:8080/simplegreeting

    The Simple Greeting page opens.

  2. Type a name in the text field.

    For example, suppose you type Duke.

  3. Click the Say Hello button.

    If you did not modify the Printer.java file, the following text string appears below the button:


    Hi, Duke!

    If you commented out the @Informal annotation in the Printer.java file, the following text string appears below the button:


    Hello, Duke.

    Figure 18–1 shows what the application looks like if you did not modify the Printer.java file.

    Figure 18–1 Simple Greeting Application

    Simple Greeting application