Programmer : Mashup Programmer : Packaging Custom Components : Generate WAR Files for Heavy Customization
 
Generate WAR Files for Heavy Customization
 
Requirements
Generate a standard WAR file
Generate a standalone WAR File
If you need to make heavy customization on your Mashup UI applications that cannot be covered by adding a few custom plugins as zip files, you will have to compile the sources and regenerate a .war file.
Our framework allows you to generate:
A standard .war file if you intend to use your Mashup UI application within your Exalead CloudView environment.
A standalone .war file (embedding the 360 configuration) if you want to deploy the Mashup UI outside of the Exalead CloudView environment.
Requirements
Generate a standard WAR file
Generate a standalone WAR File
Requirements
Tools
You need to have the following tools properly installed and configured to recompile the sources and generate a .war file:
javac, the java compiler found in the jdk
ant (http://ant.apache.org)
Supported application servers
This section lists the supported platforms when deploying the Mashup UI outside of the Exalead CloudView environment.
Platform
Level of support
Apache Tomcat 6
Validated
Apache Tomcat 7
Compatible
Jetty 8
Validated
See http://www.3ds.com/fileadmin/Support/Documents/Platform-support-policies.pdf for Dassault Systèmes support policy.
Generate a standard WAR file
Configuration files for MashupUI/360/Exalead CloudView are fetched from the file system. Therefore, we recommend using a standard WAR file when the deployment server has file system access to Exalead CloudView configuration folders. Changes made to the Mashup UI configuration are immediately reflected in the application, no redeployment is needed.
1. Go to your <INSTALLDIR>/sdk/java-mashupui/project directory.
Note: If you want to move your project to another instance, you have to edit the /WEB-INF/config/development.properties config file which is automatically filled when you run init-sdk.sh. For more details, see step 2 in Installing a Development Environment.
2. Run cloudview-war.<bat/sh> depending on your operating system.
3. Copy the 360-cloudview-mashup-ui.war file into the webapps directory of your Exalead CloudView instance (<DATADIR>/webapps).
4. Go to the <DATADIR>/config directory and open the Deployment.xml file.
5. Find the <Role> named "MashupUI" and add:
6. In your <DATADIR>/bin directory, run the following script to apply the configuration files: cvcmd.sh applyConfig
7. Restart Exalead CloudView.
Generate a standalone WAR File
It is possible to generate a standalone WAR file embedding the 360 configuration. This allows you to deploy the Mashup UI outside of the Exalead CloudView environment, for example, on another server.
To use the war with Tomcat, edit the <installdir>/sdk/java-mashupui/project/war/WEB-INF/web.xml file, and:
Delete (or comment) the Gzip filter specific to Jetty.

<!--
<filter>
<filter-name>GzipFilter</filter-name>
<filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
<init-param>
<param-name>mimeTypes</param-name>
<param-value>text/html,text/plain,text/xml,application/xhtml+xml,text/css,
application/javascript,application/x-javascript,image/svg+xml</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>GzipFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
Delete (or comment) the default servlet.

<!--
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
-->
<!--
servlet parameter to solve locked files on windows
More information https://www.eclipse.org/jetty/documentation/9.4.x/
troubleshooting-locked-files-on-windows.html
-->
<!--
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
-->
1. Go to your <INSTALLDIR>/sdk/java-mashupui/project directory.
2. Run standalone-war.<bat/sh> depending on your operating system.
This prepares a 360-standalone-mashup-ui.war file with an embedded 360 configuration.
3. Copy the 360-standalone-mashup-ui.war into the serving path of your remote javax-compatible Web Server.
4. Start the Mashup UI.
Important: Redeploy the application every time you change the configuration through the Mashup Builder. The configuration is read-only in standalone mode.