0

Can not find the tag library descriptor for "http://java.sun.com/portlet_2_

  • Asked - Apr 27, 2010, 07:01 AM
    / Viewed 70385 Times
    Hello,

    i have just implemented a very simple hello world portlet using the Plugins SDK for Liferay 6.0.1. Now i am getting this error within eclipse on my view.jsp:

    Can not find the tag library descriptor for "http://java.sun.com/portlet_2_0".

    The view.jsp looks like this:

    
    <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
    
    <portlet:defineobjects />
    
    This is the <b>Hello World by Yves</b>.
    
    


    If i deploy the portlet to the Liferay Portal it works fine.
    Does anyone know about this issue and can help me to solve this?

    Thank you.

    Best wishes,
    Yves

    2 Answers

    0
    Answered - Jan 22, 2013, 01:33 PM
    (Edited)
    http://java.sun.com/portlet_2_0 is in /docroot/WEB-INF/tld/liferay-portlet.tld
    Replied - Oct 19, 2013, 05:25 AM
    (Edited)
    I imported a war file which is in different folder. It is displaying an error that http://java.sun.com/portlet_2_0 Can not find the tag library descriptor for "http://java.sun.com/portlet_2_0". But that one is working in another projects. I included things in web.xml but even I am getting the same error.
    Thanks
    asif aftab
    0
    Answered - Apr 28, 2010, 09:11 AM
    (Edited)
    Hello again,

    just for anybody who wants to know how to solve this issue.
    Using 6.0.1, just create a web.xml with the necessary tld`s.

    Using 5.2.3, the portlet-containter.jar owns a META-INF where the tld is defined.
    I haven't tried this, but i think if one includes this jar-file into the eclipse java build path,
    the issue should dissappear, too.

    Best wishes,
    Yves
    Replied - May 19, 2011, 05:06 PM
    (Edited)
    Yves, you said "Using 6.0.1, just create a web.xml with the necessary tld`s."
    Can you explain it better? Thanks.
    Replied - Nov 6, 2011, 01:53 PM
    (Edited)
    Victor González:
    Yves, you said "Using 6.0.1, just create a web.xml with the necessary tld`s."
    Can you explain it better? Thanks.


    Adding a web.xml to your WEB-INF folder with the following content should help.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.5//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

    <web-app>

    <taglib>
    <taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
    <taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
    </taglib>

    </web-app>
    Replied - Nov 6, 2011, 05:27 PM
    (Edited)
    Hi Marco,

    The liferay-portlet and the portlet taglib is not the same.

    If you are deploying your portlet with the Liferay deploy folder, you should not worry about this.

    In the liferay-plugin-package.properties file you can define additional dtd-s here (I've copied this from the mail portlet):

    portal-dependency-tlds=\
    c.tld

    The best example to check the deployment is the sample-jsp-portlet.

    Zsolt