I've spent a few hours today trying to convert a jsr168 portlet which runs properly on IBM Portal server to a Portlet that runs on liferay because I want to use liferay as my dev environment on my local server.
Question 1:
I am getting a std-portlet.tld not found error when I deploy my portlet as below...
10:57:49,218 ERROR [ajp-bio-8009-exec-91][render_portlet_jsp:132] null
org.apache.jasper.JasperException: /_StockOnHandPortlet/jsp/html/StockOnHandPortletView.jsp (line: 2, column: 61) File "/WEB-INF/tld/std-portlet.tld" not found
I've got the latest version of eclipse and installed the liferay sdk plugin from Eclipse Market Place. I then added the liferay server runtime to the portlet which I would have thought might have fixed this problem but it has not.
Can someone give me some advice on how to fix this pls?
Question 2:
When moving from IBM Portal server to Liferay I had to include a number of jars in my web-inf lib directory that I did not have to include when deploying to IBM Portal server like the apache commons libs and the jax-rpc jars in the screenshot above.
Does this sound right that I have to do this? If so it looks like I might need to create different build files for the different portal servers. Do you agree?
thanks ...
(p.s. My project in eclipse still has the websphere facet. I've asssumed that I don't need to change that?)
I guess that std-portlet.tld
refers to what - in Liferay - is <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
(note that I'm naming the JSR-286, e.g. portlet 2.0 taglib here). I'm not sure if std-portlet is the standard name for Portlet 1.0, since 2.0 is out since approx. 2008, I've not used 1.0 in a long time.
Liferay automatically assumes that your plugins want access to the standard portlet taglib and makes it available to your application - but only under the standardized name given above. As I said, I'm not sure if you're using the standard way for portlet-spec 1.0 or an IBM-specific way. (I have no experience with both - happy to have been late to the game to only use 2.0)
All portals (and application servers) make different code available to applications on the global classpath - or during deployment. And it seems that you have found a few of those components that are made available by IBM, but not by Liferay. If you add them to your webapp (WEB-INF/lib
) or to the global classpath (tomcat/lib
or tomcat/lib/ext
) remains your own choice. Most likely you'd benefit from targetting different environments, e.g. have Liferay- and IBM-specific deployment descriptors in your project. One example would be liferay-display.xml which allows you to specify the category that your custom portlet will appear in.