Liferay integration
From GenosOrg
GMF can work as a portlet if configured properly. Also there's specific configuration to the portal, in this case, Liferay.
Contents |
[edit] GMF as a portlet
By default, GMF is configured to work as a servlet. We have to change this.
First, untar the GMF package and execute the script ./portlet.sh from GMF's root directory.
We need a war package to deploy the application in the portal. We can generate one with: jar -cf gmf.war *
This war package will include the changes done by the script to prepare everything to work as a portlet, and it should include also your specific gmf.conf configuration or other changes you might want to do to the default distribution.
[edit] Deploying in Liferay 3.6.x
Install Liferay following the install instructions you can find in the official Liferay homepage. These instructions suppose we're using the version bundled with Tomcat.
Deploy the war file we created before.
Edit the file LIFERAY/..../top_meta-exp.jsp and add the following lines:
<link rel="stylesheet" type="text/css" href="/gmf/default_portlet.css"> <link href="/gmf/jscalendar/calendar-win2k-1.css" rel="stylesheet" type="text/css"/> <SCRIPT LANGUAGE="JavaScript" SRC="/gmf/common.js"></SCRIPT>
Edit (or create in case it doesn't exist) the file LIFERAY/common/classes/portal-ext.properties and add the following properties:
default.guest.layout.resolution=1024x768 default.user.layout.resolution=1024x768 dl.file.max.size=0 dl.file.extensions=.* struts.char.encoding=ISO-8859-1
Edit (or create in case it doesn't exist) the file LIFERAY/common/classes/system-ext.properties and add the following properties:
com.liferay.filters.compression.CompressionFilter.encoding=ISO-8859-1 # Set the maximum file size. 1024 * 1024 * 1000 * 50 com.liferay.util.servlet.UploadServletRequest.max.size=52428800
The maximum file size upload should match the value configured in gmf.conf.
Copy GMF's context definition file gmf.xml to LIFERAY/conf/Catalina/localhost
That's it. Start the Tomcat server with a LIFERAY/bin/startup.sh
The GMF portlet will be loaded in the portal, and from here and with an admin user you can change the permissions and other parameters associated with the portlet.
[edit] Deploying in Liferay 4.0.x
The process is very similar to the one described for Liferay 3.6, except we have to do one last step before starting our Tomcat:
Edit the file LIFERAY/liferay/WEB-INF/liferay-display.xml and add the following inside a category:
<portlet id="GMF_WAR_gmf" />
Also, the lines added to LIFERAY/common/classes/portal-ext.properties should look something like:
default.guest.layout.resolution=1024x768 default.user.layout.resolution=1024x768 dl.file.max.size=0 dl.file.extensions=.* struts.char.encoding=ISO-8859-1 company.security.strangers=true
Note the additional parameter when comparing with Liferay 3.6 properties.
[edit] Deploying in Liferay 4.2.x
Follow Liferay 3.6 instructions, with the portal-ext.properties from Liferay 4.0.x.
[edit] Making Liferay work behind an Apache server with mod_jk
Try this in the Apache configuration file:
LoadModule jk_module APACHE_DIR/modules/mod_jk.so JkWorkersFile APACHE_CONF_DIR/workers.properties <VirtualHost *:80> ServerName machine.yourdomain JkMount /* ajp13 JkMount /c/* ajp13 JkMount /c/portal/* ajp13 JkMount /tunnel-web/* ajp13 </VirtualHost>

