Porting a struts-based web application module into eXo Portal
First of all, I should thanks Punit Pandey for providing a good comparison among java portals solutions. When I read his article, I could make my decision to choose a portal as a platform for developing tomorrow application! Thank Mr. Benjamin Mestrallet and his staff for providing this wonderful portal.
The following steps should be perform to port a struts-based web application module into eXo Portal:- ExoStrutsPortlet should be introduced as the portlet class:
File: portlet.xml - welcome file of the application should be introduced as default-page:
File: portlet.xml - PortletApplicationListener and ServletWrapper should be introduced in the web application as follow:
File: web.xml
<web-app>
<listener>
<listener-class>exo.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
</listener>
<servlet>
<servlet-name>PortletWrapper</servlet-name>
<servlet-class>exo.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PortletWrapper</servlet-name>
<url-pattern>/PortletWrapper</url-pattern>
</servlet-mapping>
</web-app> - ExoActionServlet and /struts-controller should be introduce as action servlet class and its related mapping, as follow:
File: web.xml - ExoRequestProcessor should be added as request processor of the application module as follow:
File: struts-config.xml
<portlet-app ... >
<portlet>
...
<portlet-class>exo.portal.portlet.struts.ExoStrutsPortlet</portlet-class>
</portlet>
</portlet-app>
<portlet-app ... >
<portlet>
...
<init-param>
<name>default-page</name>
<value>/login.jsp</value>
</init-param>
</portlet>
</portlet-app>
Of course you should add mandatory parts, such as supported modes
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>exo.portal.portlet.struts.ExoActionServlet</servlet-class>
...
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/struts-controller</url-pattern>
</servlet-mapping>
<controller processorClass="exo.portal.portlet.struts.ExoRequestProcessor"
debug="1" contentType="text/html">
...
</controller>
Your feedbacks are welcome masoud.omidvar@gmail.com

