To use XPLATFORM HTML5, you need to install XPLATFORM HTML5 server. This installation is the same as installing normal web application. This setup can be divided into two kinds; using war file to install in a new context and using jar file to install in the existing context.
System requirements
To perform XPLATFORM HTML5 server, the following system is required.
Category | Requirement |
---|---|
Java | More than 1.4 |
Memory | Unlimited. Larger than 1G is suggested |
Web Application Server | WAS that supports J2EE Container |
OS | Unlimited. Tested on Windows, Linux |
Installing new context using war file
The following is an explanation on installing using the war file of XPLATFORM HTML5. The explanation is based on Apache Tomcat. Please refer to the relevant WAS manual for other Web application servers.
Writing context of tomcat setting file is not supported by some version of Tomcat. Deploy did not succeed more than Tomcat 7.2.
Stage 1 : Copying war file of XPLATFORM HTML5
Copy the war file of XPLATFORM HTML5 into an appropriate directory. War file is xplatform9-ajax.war which is included in XPLATFORM HTML5 Distribution.
Stage 2 : Writing context of Tomcat setting file
Write <Tomcat Home>/conf/Catalina/localhost/xplatform9-ajax.xml file as the following.
For example, if you copied the War file of stage 1 to “C:\XAE\xplatform9-ajax.war”,
<?xml version="1.0" encoding="UTF-8"?> <Context path="/xplatform9-ajax" docBase="C:/XAE/xplatform9-ajax.war"> </Context>
Stage 3: Test after restarting Tomcat
After restarting Tomcat check if the URL
“http://host:port/xplatform9-ajax/services/AjaxCompile” with a web browser.
You will get a similar response to the following.
<?xml version="1.0" encoding="UTF-8"?> <Root xmlns="http://www.tobesoft.com/platform/dataset" ver="5000"> <Parameters> <Parameter id="errorCode" type="int">400</Parameter> <Parameter id="errorMessage" type="string"> No command specified </Parameter> </Parameters> </Root>
If you want a simpler method than the above you can get the same result when you copy the war file to the directory of <Tomcat Home>/webapps .
Installing existing Context using Jar file
The following is an explanation on installing using jar files of XPLATFORM HTML5. To install XPLATFORM HTML5 server while maintaining the existing context, you can do so by copying jar files.
For example, the name of the existing web application will be ‘myajax’ and the setup path will be ‘<Tomcat Home>/webapps/myajax’ for convenience.
Stage 1: Copying jar files of XPLATFORM HTML5
Copy the jar files of XPLATFORM HTML5 to the library directory of the existing context. In the example project XPLATFORM HTML5 jar files are copied to <Tomcat Home>/webapps/myajax/WEB-INF/lib directory. Please refer to chapter 3.6 Files for installing for a list of jar files.
Stage 2 : Copying externally dependant library
Copy the externally dependant library of XPLATFORM HTML5 to the library directory of the existing context. In the example project the externally dependant library of XPLATFORM HTML5 is copied to the directory of <Tomcat Home>/webapps/myajax/WEB-INF/lib. Please refer to Files for setup Files for installing for a list of external dependant libraries.
Stage 3 : web.xml alteration
Add the following Servlet setting to the contents of Web.xml. In the example project, it is placed in <Tomcat Home>/webapps/myajax/WEB-INF/web.
<!-- Process compile request --> <servlet> <servlet-name>AjaxCompile</servlet-name> <servlet-class>com.tobesoft.xplatform.console.AjaxCompileServlet</servlet-class> <init-param> <!-- StreamLog Whether to output --> <param-name>streamLog</param-name> <param-value>false</param-value> </init-param> <init-param> <!-- Whether to output service performance time --> <param-name>elapsedTime</param-name> <param-value>false</param-value> </init-param> </servlet> <!-- It is the HttpServlet which passes on the requested service to other service(url) and responds to the data received from other service(url) --> <servlet> <servlet-name>ForwardRequest</servlet-name> <servlet-class>com.tobesoft.xplatform.console.services.ForwardRequestServlet</servlet-class> </servlet> <!-- Find system files (images, environment files) and return --> <servlet> <servlet-name>LoadResource</servlet-name> <servlet-class>com.tobesoft.xplatform.console.services.LoadResourceServlet</servlet-class> </servlet> <!-- Process image and return with a new image (Stretch response) xplatform9-ajax-imagefilter setup is necessary --> <servlet> <servlet-name>ImageFilter</servlet-name> <servlet-class>com.tobesoft.xplatform.console.services.imagefilter.ImageFilterServlet</servlet-class> <init-param> <param-name>cacheDir</param-name> <param-value>cache/images</param-value> </init-param> <init-param> <param-name>useCache</param-name> <param-value>true</param-value> </init-param> </servlet> <!-- Process excel export request xplatform9-ajax-exportexcel set up is required. --> <servlet> <servlet-name>ExportExcel</servlet-name> <servlet-class>com.tobesoft.xplatform.console.services.exportexcel.ExportExcelServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>AjaxCompile</servlet-name> <url-pattern>/services/AjaxCompile</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ForwardRequest</servlet-name> <url-pattern>/services/ForwardRequest</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ImageFilter</servlet-name> <url-pattern>/services/ImageFilter</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>LoadResource</servlet-name> <url-pattern>/resources/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ExportExcel</servlet-name> <url-pattern>/services/ExportExcel</url-pattern> </servlet-mapping>
Stage 4: Testing after Restarting Tomcat
After restarting Tomcat, check whether the URL
“http://host:port/myajax/services/AjaxCompile“ works or not.
License
XPLATFORM HTML5 requires two licenses. One is the license for using UX-Studio and the other is the license for X-API usage. XPLATFORM HTML5 can be used normally only when both licenses are applied.
License for using UX-Studio
When you register the license you acquire usage permission of UX-Studio for HTML5 version development. Please enter in the license key as the picture shows.
The license inputting screen appears by clicking on the menu : Help > About UX-Studio… > Enter New License.
License files
Following are the types of license files.
File name | Description |
---|---|
XPLATFORM_Server_License.xml | File is provided in XML format. Is placed in the same place as X-API jar file or classes folder. Checked when running X-API, HTML5. |
XPLATFORM_Client_License.xml | Provided in XML format. It is placed in a path accessible by web. Licenseurl of ADL sets the file path and file name. Is checked when running Runtime, Widget. |
Tool License | Provided in Product Key format document Help of UX-Studio – Register in About UX-Studio. |
License on X-API usage
When you register the license you acquire the rights to use X-API which is a module used to link with a server. (It is required for compiling and distributing project.)
The name of X-API license file is “XPLATFORM_Server_License.xml”.
There are two ways in applying license for using X-API.
Include the license file in the same place as the jar file.
Include the license file in class path.
If the two license files exist at the same time the license placed in 1) is firstly applied.
In the case of including it in the same place as jar file, then generally it becomes /WEB-INF/lib of web application. In the case of including it in class path, then generally it becomes /WEB-INF/classes of web application.
Upgrade
The method to setup when the version of a portion of jar files in XPLATFORM HTML5 is upgraded will be explained. In some cases you may have to delete all existing products and rewrite all products through recompile process.
Stage 1 : Copying the upgraded jar file of XPLATFORM HTML5
Copy the jar file of XPLATFORM HTML5 of which the version has been upgraded to the same directory as the existing jar file. For example copy xplatform--x.x.jar, which is the upgraded version to <Tomcat Home>/webapps/myajax/WEB-INF/lib.
Stage 2 : Deleting the jar file of the previous XPLATFORM HTML5
Delete the jar file before upgrade. When the same jar files with different versions are in the same place, it may cause an error.
Stage 3 : Deleting existing products according to needs
If the contents of a product change according to the upgrading of jar file, you may have to delete the products from before. Generally the products are placed in directory with the project name of XPLATFORM made with UX-Studio under the context directory. For example in the case of a sample project, directory ‘<Tomcat Home>/webapps/myajax/sample’ is the place for project product.
Stage 4 : Restarting Tomcat
Test the movement of project page after restarting Tomcat. If you deleted the pre-existing products according to stage 3, perform test after stage 5.
Stage 5 : Recompiling if products have been deleted
If you deleted the pre-existing products according to stage 3, recompile the relevant project using UX-Studio.
Files for setup
The following are the files used for XPLATFORM HTML5 server setup.
XPLATFORM HTML5
Following are the setup files for XPLATFORM HTML5.
File name | Required | Main function |
---|---|---|
Xplatform-xapi-x.x.jar | o | XPLATFORM X-API |
Xplatform9-ajax-x.x.jar | o | XPLATFORM HTML5 |
Following are the externally dependant libraries of XPLATFORM HTML5.
Module name | Required | Main function |
---|---|---|
Commons-logging-x.x.jar | o | |
Commons-collections-x.x.jar | o | |
Commons-beanutils-x.x.jar | o | |
Commons-digester-x.x.jar | o | |
Commons-codec-x.x.jar | o | |
xpp3_min-1.1.4c.jar | o | |
xstream-1.3.1.jar | o |
XPLATFORM HTML5 Imagefilter
Following are the setup files for XPLATFORM HTML5 Imagefilter
File name | Required | Main function |
---|---|---|
Xplatform9-imagefilter-x.x.jar | o | Image Filtering |
Following are the externally dependant libraries of XPLATFORM HTML5 Imagefilter
Module name | Required | Main function |
---|---|---|
com.springsource.org.apache.batik.ext.awt-x.x.x.jar | o | |
commons-logging -x.x.x.jar | o | |
Commons-codec-x.x.jar | o | |
gif4j_pro_x.x.jar | o | |
imagefilter-x.x.jar | o |
XPLATFORM HTML5 Exportexcel
Following are the setup files for XPLATFORM HTML5 Exportexcel
File name | Required | Main function |
---|---|---|
xplatform9-exportexcel-x.x.jar | o | Export Excel |
xplatform-xapi-x.x.jar | o |
Following are the externally dependant libraries for XPLATFORM HTML5 Exportexcel
Module name | Required | Module |
---|---|---|
commons-beanutils-x.x.x.jar | o | |
commons-logging -x.x.x.jar | o | |
Commons-collections-x.x.x.jar | o | |
Commons-digester-x.x.x.jar | o | |
Poi-x.x.jar | o |
External option library
Following are external option library of XPLATFORM HTML5
Module name | Required | Main function |
---|---|---|
Log4j-x.x.jar | Selective |
Jar files that are required to be installed are necessary both for development and operation. It does not use AjaxCompile servlet that’s included in web.xml of chapter 3.3.3 when operating.