Hello World Tutorial
With this tutorial you will learn how to create your first Scout application.
Create a Scout Project
Start your Eclipse IDE and select an empty directory for your workspace as shown in Figure 1.
This workspace directory will then hold all the project code for the Hello World application. Once the Eclipse IDE is running it will show the Java perspective. To create a new Scout project select the menu and type “Scout Project” in the wizard search field. Select the Scout Project wizard and press Next.
In the New Scout Project wizard you have to enter a group id, artifact id and a display name for your Scout project. As the created project will make use of Apache Maven please refer to the Maven naming conventions to choose group id and artifact id for your project. The artifact id will then also be the project name in the Eclipse workspace. The display name is used as the application name presented to the user (e.g. in the Browser title bar).
For the Hello World application just use the already prefilled values as sown in Figure 2. Then, click the Finish button to let the Scout SDK create the initial project code for you.
Depending on your Eclipse installation some Maven plugin connectors may be missing initially. In that case a dialog as shown in Figure 3 may be shown. Please choose the desired actions from the combo box in the Action column until all mappings are green. E.g. for the compiler-plugin choose Install M2E connector for the Eclipse JDT Compiler from the combo box. Afterwards the selected connectors are resolved and you need to confirm the installation, accept the license, accept that some content has not been signed and restart Eclipse afterwards. To read more about Maven plugin connectors please refer to the m2e documentation.
After the New Scout Project wizard has created the initial Maven modules for the Hello World application these modules are compiled and built by the Eclipse IDE. In case of a successful Eclipse Scout installation your Eclipse IDE should display all created Maven modules in the Package Explorer and have an empty Problems view as shown in Figure 4.
Run the Application
After the initial project creation step we can start the Scout application for the first time. For this, we use the Run toolbar button as shown in Figure 5. Two launch configurations have already been created. One for the backend server and one for the HTML user interface server. Please launch the server first and the HTML UI afterwards.
In case the launch configurations are not shown in the toolbar under the debug/run icons, you may find the server-dev.launch launch file under project helloworld.server.app.dev and the ui-html-dev.launch launch file under helloworld.ui.html.app.dev. These launch files can be started using the context menu Run As which will add the launch file to the Run toolbar button.
During startup of the Scout applications you should see console output providing information about the startup. After both have been started successfully the HTML user interface can be accessed by navigating to http://localhost:8082/ in your favorite web browser.
What’s Next?
In the next tutorial, you will learn how to import the Scout demo applications into your workspace.
Do you want to improve this document? Please edit this page on GitHub.


