留言板

how to use custom liferay-ui tags in sdk portlet?

thumbnail
srikanth davuluri,修改在12 年前。

how to use custom liferay-ui tags in sdk portlet?

Junior Member 帖子: 25 加入日期: 11-6-7 最近的帖子
Hi All

I am not able to access custom liferay-ui tags in sdk portlet (working fine in ext environment )and getting below error.

java.lang.ClassNotFoundException: com.liferay.taglib.util. IncludeTag
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

Could you please let me know the solution.

thanks in advance......

regards
Srikanth Davuluri.
thumbnail
Ravi Kumar Gupta,修改在12 年前。

RE: how to use custom liferay-ui tags in sdk portlet?

Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Check any init.jsp like file in webapps/root/html/portlet and import them..
Add all tlds in docroot\WEB-INF\tld.. if they are not there by default..
You can copy them from liferay deployed folder.
thumbnail
Vikas R Khengare,修改在12 年前。

RE: how to use custom liferay-ui tags in sdk portlet?

Junior Member 帖子: 58 加入日期: 08-8-1 最近的帖子
I think you also need to include "util-taglib.jar" file to /WEB-INF/lib/ folder
thumbnail
srikanth davuluri,修改在12 年前。

RE: how to use custom liferay-ui tags in sdk portlet?

Junior Member 帖子: 25 加入日期: 11-6-7 最近的帖子
Ravi Kumar Gupta:
Check any init.jsp like file in webapps/root/html/portlet and import them..
Add all tlds in docroot\WEB-INF\tld.. if they are not there by default..
You can copy them from liferay deployed folder.

Vikas R Khengare:
I think you also need to include "util-taglib.jar" file to /WEB-INF/lib/ folder


thanks for your suggestions.I tried both but still facing same problem in SDK environment (working fine in EXT environment).
when i am using custom tag in SDK portlet facing error with IncludeTag.java file.
and error is
javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/liferay/taglib/util/IncludeTag
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:268)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at org.apache.portals.bridges.struts.PortletServletRequestDispatcher.invoke(PortletServletRequestDispatcher.java:128)
at org.apache.portals.bridges.struts.PortletServletRequestDispatcher.forward(PortletServletRequestDispatcher.java:135)
at com.liferay.portal.apache.bridges.struts.LiferayRequestDispatcher.invoke(LiferayRequestDispatcher.java:155)

thanks in advance.........
thumbnail
Christianto Sahat,修改在12 年前。

RE: how to use custom liferay-ui tags in sdk portlet?

Regular Member 帖子: 179 加入日期: 07-9-25 最近的帖子
Try to add util-taglib.jar on your liferay-plugin-package.properties ( under portal-dependency-jars )


portal-dependency-jars=\
    displaytag.jar,\
    jstl-api.jar,\
    util-taglib.jar,\
    jstl-impl.jar

portal-dependency-tlds=\
    displaytag.tld,\
    c.tld,\
    fmt.tld


Also add *.tld file needed for the taglib on portal-dependency-tlds above.
thumbnail
Vikas R Khengare,修改在12 年前。

RE: how to use custom liferay-ui tags in sdk portlet?

Junior Member 帖子: 58 加入日期: 08-8-1 最近的帖子
Hi Shrikanth,

Your problem is, Class Not Found Exception; The class you mentioned is in util-taglib.jar.
So including above jar and TLD files at correct location should solve your problem.

Check
1) liferay-xxx.tld files are exists in /(tomcat.home)/webapps/your-portlet/WEB-INF/tld/
2) Put util-taglib.jar, util-java.jar, util-bridges.jar, jstl-api.jar, jstl-impl.jar files in /(tomcat.home)/webapps/your-portlet/WEB-INF/lib/

Check whether all these files are present in your Tomcat. Might be you are including these files in your classpath of eclipse but in actual deployed folder within Tomcat.