Portlet Deployment
There are two ways of deploying portlets :
- using the eXo Platform eclipse plugin
- deploying the portlet manually
We advise you to use the
eclipse plugin to simplify the portlet deployment.
Manual Deploy
If you have to deploy the portlet manually, you will have to only modify the
web.xml of your portlet application WAR file so that the platform can deploy the portlet into the portlet container.
- Firstly, you have to set the value of the web.xml display-name tag using the portlet application name for this purpose. So, for example, if your application is in yourApp.war the display-name tag must be yourApp.
- Then you need to add some listener and servlet tags :
<listener>
<listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
</listener>
<servlet>
<servlet-name>PortletWrapper</servlet-name>
<servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PortletWrapper</servlet-name>
<url-pattern>/PortletWrapper</url-pattern>
</servlet-mapping>
Finally just place your
WAR file into the deployment directory of your
application server.
In eXo Portal open the
Application Registry and click on "
Auto Import?". After importing you will see the name of your
webapp among the
categories on the left pane. Click on your webapp/category to see your portlet(s).