1. Construct Eclipse Development Environment
To develop web applications based on iPLAss, the gradle project skeleton for Eclipse is provided. This guide will go through the process starting from setting up the Eclipse and compiling the projects, until eventually start the web applications after all the configurations.
2. Prerequisite
In order to construct the development environment, please have the following environment prepared.
JDK | |
AP Server | |
DB Server | One of the followings
|
Eclipse |
2.1. Setting Tomcat
Install/Decompress the downloaded installer or compressed files to any directory.
Put the JDBC driver of the corresponding Database being used in the lib folder at Tomcat’s directory.
| In real-life production environment, there are cases that the Database rely on DataSource for connections. To use DataSource, it is necessary to place the JDBC driver in the directory of Tomcat. This document does not use DataSource, but for the reason depicted above, we want to place the JDBC driver at Tomcat side rather than the project side. |
2.2. DB Configuration
If there is no existing database and tables for iPLAss, then it is necessary to configure the DB in order to start with.
Please follow one of the following methods to create the database and tables.
Use Install and Run wizard.
Download iPLAss SDK, and execute the DDL included in the package to create the database and tables.
| When constructing production environment, please utilize the DDL files from iPLAss SDK. As the method from Install and Run is not recommended in that case. If Java 11 are used, please make sure your Database and JDBC are updated to the newest version. The connection policy was modified to TLSv1.3 in Java 11 so the old versions may not comply with and will throw Exceptions. |
2.3. Configuring Eclipse
Run the downloaded installer.
IfJAVA_HOMEwas not set, the dialog to selectjavaw.exewill show up. Please select thejavaw.exein the directory of the installed JDK.On the started interface page, select
Eclipse IDE for Java EE Developers, and install to any directory.After the installation, start the Eclipse and create the workspace at any directory.
From the menu bar, choose
Window > Preferenceto open the interface for settings.Settings for Encoding
AtGeneral > Workspace, change the Text file encoding toOther(UTF-8).Settings for JDK
Make sure the installed JDK shows inJava > Installed JREs. If it was not there, add the JDK manually and set it to default. Then, openJava > Compilerand check ifCompiler compliance levelis1.8. (It is11for Java 11)Setting for Tomcat
Add the installed Tomcat inServer > Runtime Environments. ChooseApache Tomcat v8.5, and specify the Tomcat directory that we installed previously.
3. Create the Project
Project is using the source from GitHub .
Clone or download You can either Clone or download the URL, but it is recommended to download the zip file.
3.1. Create with Cloning
The project can be created by the following steps.
Import the project.
Copy the URL from Clone option.
Right click the
Project Explorerfrom Eclipse, and choseImport > Import….Then choose
Git > Projects from Git.Then
Clone URI.Make sure the copied URI is in Location’s URI box, and fill in the username and password for the Authentications.
Choose
masterbranch.At Destination’s
Directory, specify the workspace that was indicated when starting the Eclipse.Choose
Import as general projectat project import wizard.Project Name does not need to be modified, just click
Finish.
From the menu bar, select
Window > Perspective > Open Perspective > Other > Git, and openGit Repository.Right click
iplass-skeletonand clickDelete Repository.Check
Delete Git repository data and historyand clickOK.After deleting the content, refresh the project.
| When creating the project by cloning, a Github account is necessary. |
3.2. Create with ZIP File
The project can be created with the following steps.
At
Clone or download, click onDownload ZIPto download the ZIP file.Decompress the ZIP file, and move the
iplass-skeletonfolder to the root directory of your workspace.
Right click the
Project Exploreron the top-right of Eclipse, and chooseImport > Import….Then
General > Projects from Folder or Archive.For
Import source, specify the folder you moved to the workspace, uncheck theDetect and configure project natureand then clickFinish.
3.3. Create with iPLAss SDK
Create the project with the skeleton project included in iPLAss SDK.
Download from Download_Site or from the URL given along with the enterprise edition’s contracts.
Decompress the iPLAss SDK, place the
iplass-skeletonfolder to the workspace of eclipse.
For the enterprise edition, it is iplass-ee-skeleton. |
Open the
iplass-ee-skeletonfolder and overwrite the existedgradle.propertiesby the one provided along with the Enterprise Edition’s contracts.
Right click the
Project Exploreron top-right of the Eclipse, and chooseImport > Import….Then
General > Projects from Folder or Archive.For
Import source, specify the folder you moved to the workspace, uncheck theDetect and configure project natureand then clickFinish.
3.4. General Settings After Importing
Decide the name for the projects and change it via
Refactor > Rename.Use
Refactor > Moveto move the project folder corresponding to the project name.Change the rootProject.name from
setting.gradleaccording to the project name.
As mentioned before, the JDBC driver placed in Tomcat directories will be used when running the web applications. It is also used when running the Tenant tools which will be discussed later.
Oracle(ojdbc8.jar)'s case
From the vendor’s download site, you can download the jar file, please put it in the lib folder directly under the directory of the project.Any of MySQL, PostgreSQL, SQLServer
Uncomment the relative line from build.gradle.
Right click the project, and click
Configure > Add Gradle Natureto turn the project to a gradle project.Click the
Gradle > Refresh Gradle Projectto start downloading the dependencies.
Get to the project’s
Propertieswindow, and do the following operations.Modify the context root from
Web Project Settingsaccording to the project name.On the page of
Project Facets, check the following items and set the versions.
| Project Facet | Version |
|---|---|
Runtimes | Apache Tomcat v8.5 |
Java | 1.8 (11 for Java 11) |
Dynamic Web Module | 3.1 |
Modify the settings from
src/resources/mtp-service-config.xml. Please change the following items.
<serviceDefinition>
<inherits>/mtp-core-service-config-oracle.xml</inherits> (1)
<!-- If use mysql, inherits mtp-core-service-config-mysql.xml for convenience. -->
<!--
<inherits>/mtp-core-service-config-mysql.xml</inherits>
-->
<!-- If use postgresql, inherits mtp-core-service-config-postgre.xml for convenience. -->
<!--
<inherits>/mtp-core-service-config-postgre.xml</inherits>
-->
<!-- If use sqlserver, inherits mtp-core-service-config-sqlserver.xml for convenience. -->
<!--
<inherits>/mtp-core-service-config-sqlserver.xml</inherits>
-->
・・・
<service>
<interface>org.iplass.mtp.impl.rdb.connection.ConnectionFactory</interface>
<!-- DriverManager base ConnectionFactory -->
<class>org.iplass.mtp.impl.rdb.connection.DriverManagerConnectionFactory</class>
<!-- ■ your rdb setting 1 ■ -->
<!-- for oracle --> (2)
<property name="url" value="jdbc:oracle:thin:ADDRESS:PORT:DB" /> (3)
<property name="user" value="XXXXX" />
<property name="password" value="XXXXX" />
<property name="driver" value="oracle.jdbc.driver.OracleDriver" />
・・・
</service>
・・・
<service>
<interface>org.iplass.mtp.impl.lob.LobStoreService</interface>
<!--
To save Binary data in files, uncomment the following comments.
FileLobStore is mandatory for MySQL and PostgreSQL.
※The following setting is to store Binary data in file, and LongText data in RDB.
If it is need to store LongText data in files, please also set the setting of longTextStore to FileLobStore.
-->
<!--
<property name="binaryStore" class="org.iplass.mtp.impl.lob.lobstore.file.FileLobStore"> (4)
<property name="rootDir" value="[setYourBinaryFileStoreRootPath]" /> (5)
<property name="overwriteFile" value="false" />
</property>
<property name="longTextStore" class="org.iplass.mtp.impl.lob.lobstore.rdb.RdbLobStore">
</property>
-->
・・・
</service>
・・・
<service>
<interface>org.iplass.mtp.impl.mail.MailService</interface>
・・・
<!-- ■ for develop only (additional="true) ■ -->
<!-- To enable the debug mode for sending mails, Please uncomment the following code.-->
<!--
<property name="listener" class="org.iplass.mtp.mail.listeners.LoggingSendMailListener" additional="true"/> (6)
-->
</service>
・・・
</serviceDefinition>| 1 | Change depending on the DB in use. |
| 2 | Comment/Uncomment depending on the DB in use. |
| 3 | Change along with the created DB scheme. |
| 4 | Uncomment it if using MySQL or PostgresSQL. |
| 5 | Set the path to store binary files. |
| 6 | Uncomment it only for development environment. |
At this point, the project is successfully deployed.
4. Create the Tenant
Tenant is like the conceptual division of the server. We have to specify which tenant to access when using iPLAss. Let’s use the GUI tools to create a Tenant.
Run the Gradle task
runTenantBatch.Click the
Create Default Tenanton the shown interface.On the dialog, input
name,AdminUserId,AdminUserPasswordand clickCreate.
| before creating the tenant, please make sure to configure mtp-service-config.xml and set the DBA user with corresponding privileges. |
5. Execution
We will start the server, and access the Tenant from the browser.
5.1. Start the Server
Right click the root of the project in Eclipse, choose
Run As > Run on Server. (Later on you can start fromServertab)Select
Tomcat v8.5 Serverthen click on [Finish]. IfAlways use this server when running this projectis checked, the server will directly go for the same setting on forth.
5.2. Show the Login Page
Once the server is running, access the following URL by the browser.
http://localhost:8080/Context_Name/Tenant_Name/
For instance, if the project was created with contextRoot being sampleApp, and tenant being sampleTenant, then the URL will be:
http://localhost:8080/sampleApp/sampleTenant/
If the web application started normally, the following login page will be presented. Please use the manager ID and password specified when creating the tenant to log in.

6. Next Step
For the people who are first time with iPLAss, please begin your journey with our Tutorial.