Deploying a Portlet to Pluto Portal Version 3.0

The portlet war file is built just like any other web application war file. No special processing steps are necessary. Note in particular that the assembly processing step required by Pluto version 2.0 is no longer needed.

Portlet Deployment

To deploy a portlet application, simply deploy the application war using any standard mechanism for your application server. There are many maven plugins and ant tasks that can assist with this, or you can use an administrative web console. This console is the Tomcat manager webapp in the Pluto bundled distribution and is accessed via the 'Upload and deploy portlet war' link on the page administration portlet. See the Help link on that portlet for more details.

In the bundled distribution that uses Tomcat, deployment of an assembled war can simply be done by dropping the war into the webapps directory. You can automatically achive this by adding the following code within the plugins section of your maven pom.xml:

       <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>integration-test</phase>
            <configuration>
              <tasks>
                  <property environment="env"/>
                   <!-- This assumes that you have set a CATALINA_HOME environmental variable -->
                  <property name="pluto.home" value="${env.CATALINA_HOME}"/>
                  <copy file="target/${pom.name}.war" todir="${pluto.home}/webapps"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>          
          

Once the pom.xml file has been updated with this plugin, you can run the full build and deployment using the command: mvn integration-test. The code assumes that you have set the environmental variable CATALINA_HOME to the Pluto home directory. If that has not been done, just set pluto.home from the command line with the -D flag. The command line would then be: mvn -Dpluto.home=C:/pluto integration-test.

Portlet Publishing

As soon as the portlet application (war) is deployed to the servlet container the portlet application will be available to the portal and can be added to pages using the page administration portlet. See the help mode in this portlet for details on its use.

Portal Page Configuration

If you'd like for your page configuration to be consistent throughout restarts of the application server (currently placements made through the page administration portlet is not persistent), you should then configure the page layout in the portal-driver configuration file (pluto-portal-driver-config.xml).

The page can then be configured by adding a page child element of the render-config element, like this:

<render-config default="Test Page">
  ... ...
  <page name="Your Portal Page Name"  uri="/WEB-INF/themes/pluto-default-theme.jsp">
    <portlet context="/your_portlet_app_context_path" name="your_portlet_1"/>
    <portlet context="/your_portlet_app_context_path" name="your_portlet_2"/>
  </page>
</render-config>
          

The uri attribute defines the theme of your portal page. If you use /WEB-INF/themes/pluto-default-theme.jsp (which is the default theme of Pluto Testsuite portlet app), your portlets will be displayed in two columns. You can clone this file to customize your layout. If you do so, make sure the uri attribute points to the new file.