How to manually build an application for Pluto 2.0.3, using ICEfaces EE 3.3 P05

Table of Contents

For pluto 2.0.3 and ICEfaces-3.3.0_P05 and newer releases, the following Liferay jars are to be used (See http://www.liferayfaces.org/):-

<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.bridge.ext</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.bridge.impl</artifactId>
<version>3.1.0</version>
</dependency>

If /WEB-INF/portlet.xml is not there already, create a new file with the name portlet.xml, whose root element is as follows:

<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
             version="2.0"
	         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	         xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">

</portlet-app>

In portlet.xml, there must be an entry for each portlet like the one below:

    <portlet>
        <portlet-name>myPortlet</portlet-name>
        <display-name>My Portlet</display-name>
        <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
        <init-param>
            <name>javax.portlet.faces.defaultViewId.view</name>
            <value>/portlet-view.xhtml</value>
        </init-param>
        <init-param>
            <name>org.icefaces.demo.viewPath</name>
            <value>/resources/myPortlet/myPortlet.xhtml</value>
        </init-param>
        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>
        </supports>
        <portlet-info>
            <title>My Portlet</title>
            <keywords>My Portlet keywords</keywords>
        </portlet-info>
    </portlet>

Make sure to replace 'myPortlet', 'My Portlet', 'My Portlet keywords', and '/resources/myPortlet/myPortlet.xhtml' for the right names and values of your portlet.

In /WEB-INF/web.xml, there must be the following two entries for each portlet.

	<servlet>
		<servlet-name>myPortlet</servlet-name>
		<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
		<init-param>
			<param-name>portlet-name</param-name>
			<param-value>myPortlet</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>myPortlet</servlet-name>
		<url-pattern>/PlutoInvoker/myPortlet</url-pattern>
	</servlet-mapping>

Make sure to replace the four occurrences of 'myPortlet' for the name of your portlet, which must match with the portlet name of the entry in portlet.xml.

No other configuration files are necessary for Pluto other than faces-config.xml, which doesn't need to be modified for portlets.

Once, all this has been configured for each portlet, save the files, and build a ZIP file of the entire unzipped folder, which should now contain all these modifications and additions. Finally, change the extension of this ZIP file to .war. You may now deploy your application on Pluto 2.0.3.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2021 ICEsoft Technologies Canada Corp.