I will explain the linkage process between Eclipse and Wagby.

The character code of the file output by Wagby is UTF - 8.Introduction Set the encoding of text files in Eclipse.

Select "Window" from the menu and open "Settings".

Figure 1 Window> Settings

The encoding of the text file prepared in "General> workspace" is "UTF - 8".

Figure 2 Encoding settings

We will make Tomcat enclosed by Wagby as standard, to be recognized as "server" from Eclipse.

Select "File" from the menu and open "New> Other ...".

Figure 3 File> New> Other ...

Select "Server" on the new wizard screen and click the "Next" button.

Figure 4 Setting up the server

Select Apache Tomcat v 7.0 as the server.(Tomcat that is included in Wagby is v7 series.)

The server name should be as follows.Please match the Wagby version number to your version.


Figure 5 Defining a new server

As the installation directory of Tomcat, specify the wagbyapp folder provided by Wagby.

In this example, wagbyapp in the Wagby - 7.0.4 folder is specified.

Figure 6 Specifying installation directory

When you click "Finish" button in the window of Figure 6, a server icon is prepared in the project explorer in the Eclipse screen.(FIG. 7)

Figure 7 Adding the Servers icon

Select "Window" again from the menu and open "Settings".Make sure that "server> runtime environment" is set as shown in Figure 8.(Please confirm only here.)

Figure 8 Checking server runtime environment

Register the application (wagbyapp) built with Wagby in Eclipse.

Select "Import ..." from the menu "File".

Figure 9 Importing files

From the Import Wizard screen, select "General> Existing Project to Workspace".

Fig. 10 Existing project to workspace

For the root directory, specify the folder where you installed Wagby (eg Wagby - 7.0.4).

After designation, the project name which can be automatically imported is displayed in the project column, so check the target and press the completion button.

Figure 11 Project import

A Wagby icon is prepared in the Project Explorer.

Figure 12 Wagby added to Project Explorer

We will set up the necessary environment to start Wagby.

First, open the ".settings" folder prepared in the folder where you installed Wagby. Open "launchConfiguration.txt" included in this with a text editor such as TeraPad.(Please do not use Notepad attached to Windows.)

This file contains the settings for the two entries "VM arguments" and "Working Directory".I will copy this value into the Eclipse setting field.

Figure 13 launchConfiguration.txt

I will return to Eclipse.Double-click the Tomcat icon for Wagby provided on the "Server" tab at the bottom of the screen.The setting screen will open.(FIG. 14)

Click the "Open launch configuration" link here.

Figure 14 Tomcat setting screen for Wagby

The launch configuration properties window opens.Select the Arguments tab.The initial state is as shown in Fig. 15.

Figure 15 Startup Configuration Properties Window

Copy the value of "VM arguments" in Figure 13 to this "VM argument" column.(FIG. 16, FIG. 17)

Figure 16 Add value to VM argument of startup configuration property window (1)
Figure 17 Add value to VM argument in startup configuration property window (2)

Copy the value of "Working Directory" in Figure 13 to the "Working Directory" column of the startup configuration property.

Figure 18 Setting the working directory in the startup configuration properties window

Click the "OK" button in the start configuration property window to finish. Next, select the "Module" tab on the setting screen.

Click the "Add Web module ..." button and add the "/wagby" path.(Fig. 19)

After adding, press the save icon in the menu section to save this setting.(Please do not forget to save.)

Figure 19 Adding Web Module

The setting is over at this point.Try running Tomcat (the entity is Tomcat that is bundled with Wagby) in the server tab from Eclipse.Press the activation icon (red frame in Figure 20).

Figure 20 Tomcat Launch Icon

If a Windows security warning is output, "allow access" is assumed.

Figure 21 Windows Security Alert

From the console log, you can check whether Tomcat was started successfully.

In "Starting Servlet Engine: Apache Tomcat/7.0.xx", check the version of Tomcat. If the message "Server startup in xxx ms" is displayed, Tomcat is running. After this, you can operate the Wagby application from the web browser.

Figure 22 Checking Tomcat startup