插件部署有很多種方法,其中一種方法:
將portlet插件部署到tomcat後,通過命令jar –cvf commodities.war *.*打成war包(如果是WebLogic部署直接壓縮成rar包即可)。
如果是在WebSphere上部署,需要在web.xml中加入下列一段話:
<context-param>
<param-name>com.ibm.websphere.portletcontainer.PortletDeploymentEnabled</param-name>
<param-value>false</param-value>
</context-param>
因爲在這裏我們需要使用Liferay自己的Portlet容器而不是WebSphere Application Server自帶的,如果沒有任何配置的情況下,WebSphere Application Server總是使用自己的Portlet容器。