Modifying Hello World Service
Modifying Hello World Service
When you modify service Java code, Eclipse automatically compiles the changes into .class files that the server runs. To test your changes, you must re-start the server, so that it loads the updated .class files.
Let's modify the Hello World servuce and include the current user's name into the message formatted on the server.
- Open the HelloWorld.java.
-
Add the highlighted code:
-
Press
CTRL-S
to save the file. Eclipse will compile your changes into a .class file when the file is saved.
-
If Jetty server is running, stop it:
- If the Console window is not visible, open it by selecting in the main menu: Window --> Show View --> Console .
-
Click on the
Terminate
icon (
red square
) in the Console window toolbar.
-
Start Jetty server:
-
Select the
webcentral-all-Jetty.launch
file in the Package Explorer window and select in the main menu: Run --> Run As... -> webcentral-all-Jetty .
-
Select the
-
After the Jetty server starts, open the browser and navigate to the
http://localhost:8080/archibus/schema/ab-products/solutions/logic-cookbook/ab-ex-hello-world.axvw
view.
-
Click on the
Hello World
button. The new message will be displayed: