Page tree
Skip to end of metadata
Go to start of metadata

After you create a portlet project, you need to deploy it over your Tomcat server instance and install it in the Dashboard module. The following topics in this section describe how this is done:

Creating a web application archive (WAR) from your portlet project

The first step is to create a web application archive (WAR) that includes all the required portlet project files. To do so, perform the following task:

  1. Display the Antview in the Integration Studio API. To do so:
    1. From the Integration Studio menu, select Window > Show View, and click Ant.
  2. Drag and drop the build.xml file (the last object in your portlet project tree view) to the Ant view.
  3. Click the (Run) button to run the default target of your build file.

    Building the WAR archive

After you run the target, you can check the execution log in the Console view. The created archive will be located in the deploy folder of your project.

You can change the file name of the archive or its location by modifying the build.xml file, and re-running the ant script as shown in the following example:

<jar destfile="./deploy/myapp.war">
  <fileset dir="./target">
  </fileset>
</jar>

Installing the WAR file in the Dashboard module

The second step is to copy the generated WAR file in the $CPIT_BASE/web/dash-autodeploy Dashboard auto-deploy folder. After some time, the new portlet will be available for being added to the Dashboard.

Configuring auto-deploy settings

To configure auto-deploy settings, you have to access the portal-ext.properties file located in the $CPIT_BASE/web/tomcat-dash/webapps/dash/WEB-INF/classes folder, and modify the following lines:

# auto-deploy settings:
auto.deploy.enabled=true
auto.deploy.deploy.dir=/opt/cpit/web/dash-autodeploy
auto.deploy.dest.dir=${catalina.base}/webapps

These lines can be understood as follows:

  • auto.deploy.enabled=true: Enables or disables the auto-deploy feature
  • auto.deploy.deploy.dir=/opt/cpit/web/dash-autodeploy: Specifies the folder in which to upload the WAR file of your portlets
  • auto.deploy.dest.dir=${catalina.base}/webapps: Configures the directory where auto-deployed WAR files are copied to.

When you are done, restart your Tomcat instance to apply changes.