Posted on : 28-11-2008 | By : Jeff Robinson | In : General
2
When using the Liferay Plugin SDK to build portlets, I’ve discovered that:
- Your portlet lib folder should contain only jars that are NOT in the Liferay portal ROOT lib folder.
- If your portlet needs access to jars already in Liferay, edit the WEB-INFliferay-plugin-package.properties file and add those jars to the portal-dependency.jars area.
During the build, those jars are temporarily copied to the porlet lib area and deleted afterwards. During deployment, those jars are copied from Liferay’s lib folder to the deployed portlet lib folder.
Problem: if you’ve already copied the jars yourself, Liferay won’t do the copy. This could lead to version headaches and all kinds of strange Exception errors within Liferay.
Posted on : 25-11-2008 | By : Jeff Robinson | In : General
0
Although JSR 168 specifies that portlets do NOT have access to the client request of the portal (JSR 168, p. 16), Liferay developers will find that they do have access to this URL. If using the extension environment, take a peek at the JSP source in:
[liferay]portal\portal-web\docroot\html\portlet\init.jsp
Once there, youl’ll find the following code:
String currentURL = PortalUtil.getCurrentURL(request);
This means that each portlet JSP has immediate access to the original URL without any special tokens or encoding. And since this file is included in the downstream JSP, you only need to access “currentURL” within your JSP to have access. You never know when this might come in handy!
Posted on : 24-11-2008 | By : Jeff Robinson | In : Annoucements
0
The Robisoft site has been updated and features blogging and search capabilities.
Next up: a new portlet featuring Spring Wizard controller for some of the Liferay Enterprise Admin functions.