terça-feira, 20 de janeiro de 2015

Failed to load or instantiate TagExtraInfo class: com.ibm.ws.portletcontainer.tags.DefineObjectsTag

Failed to load or instantiate TagExtraInfo class: com.ibm.ws.portletcontainer.tags.DefineObjectsTag

Migrating a portlet application from Websphere Portal to Liferay can bring some problems. One of the problems that i faced has to do with the taglibs used in JSP. 
To be able to use the tag




you have to set the include for the portlet taglib, like this:
<%@taglib uri="http://java.sun.com/portlet" prefix="portlet" %>



In Websphere that taglib location is in the class:
com.ibm.ws.portletcontainer.tags



If you try to run the application, you'll have the error:
 Failed to load or instantiate TagExtraInfo class: com.ibm.ws.portletcontainer.tags.DefineObjectsTag

because Liferay can't find that class. 

How to fix it?

Edit the applications web.xml file, and add

http://java.sun.com/portlet_2_0
/WEB-INF/tld/liferay-portlet.tld



 
Note that you have to have the tld file in the location you provide.
And that's it.

Sem comentários:

Enviar um comentário