Please refer to the following link for some documentation on portals and portlets development.
Follow the installation instructions and use the FAQs.
Download the following files from sourceforge for version 4.3.5
I had to copy the following jars in common/lib
dl.root.dir=../documentlibrary/root/ dl.version.root.dir=../documentlibrary/vroot/ jcr.jackrabbit.repository.root=../liferay/jackrabbit auto.deploy.deploy.dir=../webapps lucene.dir=../liferay/lucene/ portal.ctx=/Portal cas.auth.enabled=true terms.of.use.required=false # # Set the default values for the required CAS URLs. # cas.login.url=https://glast-ground.slac.stanford.edu/cas/login cas.logout.url=https://glast-ground.slac.stanford.edu/cas/logout cas.service.url=http://glast-ground.slac.stanford.edu/Portal/c/portal/login cas.validate.url=https://glast-ground.slac.stanford.edu/cas/proxyValidate
To force the login edit webapps/Portal/index.jsp and replace:
<body onload="javascript:location.replace('<%= PortalUtil.getPathMain() %>')">
with
<body onLoad="javascript:location.replace('/Portal/c/portal/login')">
To use the Single-Sign-On CAS server we are using the all the other applications Liferay must be integrated with it. Instructions can be found here.
The following are the steps I followed:
auto.login.hooks=com.liferay.portal.security.auth.BasicAutoLogin,com.liferay.portal.security.auth.CASAutoLogin
passwords.change.on.first.use=false
Liferay 4.2.1 is deployed in an external Tomcat server 5.5.17 running with Java 1.6 and can be viewed here.
Liferay provides a distribution with a bundled tomcat server that works out of the box very easily.
Despite the fact that Liferay provides a detailed documentation on how to run the portal in an external tomcat server, it took several hours to make this happen. The following is a list of things that were not clear of that needed to be changed:
The following options have been added to the tomcat startup script:
-Dfile.encoding=UTF8 -Djava.security.auth.login.config=${CATALINA_BASE}/conf/jaas.config
IMPORTANT all database connections must be defined within liferay Portal. This is done by adding them to conf/Catalina/localhost.ROOT.xml rather than conf/server.xml
VERY STRANGE Under the Admin portlet there should be an Auto Deploy tab that allows to deploy portlets. The test user has such tab. In order to have such tab for any other user add a similar line to WEB-INF/classes/portal-ext.properties:
omniadmin.users=turri omniadmin.users=tonyj
Could not find anything in the database that could explain this strangeness.
Liferay needs its own pool of users to keep track of layouts and preferences. So far I have not managed to use an external pool of users.
I managed to add users to liferay's pool by simple sql statements without having to restart liferay. If we adopt this strategy we will have to keep the liferay pool of users synchronized with the group manager's one.
Following the instructions on how to setup the netbeans portlet development plugin is as accurate as tedious.
Beside the netbeans plugin itself you have to install:
The Netbeans plugin is all you need. It allows to create netbean projects that are complient with the portlet specifications (the skeleton).
The addition of Glassfish and of Enterprise Class Portlet Container allows to nicely deploy the generated potlets within netbeans with just one click. Cute but not really necessary (maybe for developing code).
The good news is that the above generated projects can be deployed in Liveray using their Hot Deploy under the Admin tools.
JSP works but not that well. Links, Forms, everything has to be written according to "portlets" specifications, using portlet tags in order to be well integrated into the portal.
Check-out from the glast CVS repository the project org-glast-portlet. It contains a zip file with a minimal portlet maven project called GlastPortlet. After extracting the content of the zip file you will have to make the following changes:
You are now ready to start editing the provided jsp files and add some more.
So far it is only possible to deploy portlets via the Hot Deploy Administrator feature of Liferay. You will have to be granted priviledges to do so.
To have Displaytag tables well integrated in the portlet it is necessary to install their portlet extention as documented here. The displaytag-portlet.jar file can be downloaded from the glast-ground maven repository:
<dependency> <groupId>displaytag</groupId> <artifactId>displaytag-portlet</artifactId> <version>1.1</version> <type>jar</type> <properties> <war.bundle>true</war.bundle> </properties> </dependency>
As a dependency it requires commons-collections version 3.1