facebook

specify taglibs for completion [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #208675 Reply

    andmer
    Member

    Hi all,

    in my web.xml I have this:
    <taglib>
    <taglib-uri>http://opensymphony.com/oscache</taglib-uri&gt;
    <taglib-location>/WEB-INF/lib/oscache-2.0.2.jar</taglib-location>
    </taglib>

    and in my jsp i have this:
    <%@ taglib uri=”http://opensymphony.com/oscache&#8221; prefix=”oscache” %>

    the TLD is in the jar file, however i get the error
    “could not load TLD for uri=http://opensymphony.com/oscache”

    Not sure why its not picking it up.

    #208676 Reply

    andmer
    Member

    oh by the way this is in eclipse 3RC2, and 3.8 beta1

    #208679 Reply

    Riyad Kalla
    Member

    Remove your taglib entry from the web.xml file, and add your oscache.jar file to your build path, then it will work. (struts does the same thing)

    #208861 Reply

    andmer
    Member

    Hey thanks for the help, but I still have the same error message though.

    I removed the taglib entry from my web.xml, and oscache.jar was already in my build path as it is in WEB-INF/lib.

    #208864 Reply

    andmer
    Member

    i think the problem is with their TLD. gonna try and figure out why.

    #208865 Reply

    andmer
    Member

    <?xml version=”1.0″ encoding=”ISO-8859-1″ ?>

    <!DOCTYPE taglib PUBLIC “-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN” “http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd”&gt;

    <taglib>
    <tlib-version>1.6</tlib-version>
    <jsp-version>1.1</jsp-version>
    <short-name>oscache</short-name>
    <uri>http://opensymphony.com/oscache</uri&gt;
    <description>OSCache – see http://www.opensymphony.com/oscache</description&gt;

    <tag>
    <name>cache</name>
    <tag-class>com.opensymphony.oscache.web.tag.CacheTag</tag-class>
    <body-content>JSP</body-content>
    <description>A tag to cache post-processed JSP contents</description>

    <attribute>
    <name>time</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>duration</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>cron</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>refreshpolicyclass</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>refreshpolicyparam</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>refresh</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>mode</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>key</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>groups</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    <attribute>
    <name>language</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>

    <tag>
    <name>usecached</name>
    <tag-class>com.opensymphony.oscache.web.tag.UseCachedTag</tag-class>
    <description>A tag to tell the cache to use the cached version</description>

    <attribute>
    <name>use</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>

    <tag>
    <name>flush</name>
    <tag-class>com.opensymphony.oscache.web.tag.FlushTag</tag-class>
    <description>A tag to flush the cache</description>

    <attribute>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>key</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>group</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>language</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>pattern</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>

    <tag>
    <name>addgroup</name>
    <tag-class>com.opensymphony.oscache.web.tag.GroupTag</tag-class>
    <description>A tag to add a group to an ancestor cache tag</description>
    <attribute>
    <name>group</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>

    </taglib>

    #208869 Reply

    No Operation
    Member

    <taglib>
    <taglib-uri>http://opensymphony.com/oscache</taglib-uri&gt;
    <taglib-location>/WEB-INF/lib/oscache-2.0.2.jar</taglib-location>
    </taglib>

    This maps the URI to the file “taglib.tld” in folder META-INF/taglib.tld.
    Since your taglib.tld file contains exactly the same URI, the declaration in web.xml is kind of superfluos.
    But it has one use:
    It disables ALL other tld files containing the same URI but the one tld file at META-INF/taglib.tld in the /WEB-INF/lib/oscache-2.0.2.jar.

    Q: Where is your tld file located?

    NOP

    #208881 Reply

    andmer
    Member

    yeah, it is. Originally the tld did not have <uri>http://opensymphony.com/oscache</uri&gt;, i added that myself this morning so it would not need the web.xml locator.

    the tld is in the jar META-INF.

    #208904 Reply

    support-michael
    Keymaster

    Did your recent change resolve the problem?

    #208983 Reply

    andmer
    Member

    yes

    #208985 Reply

    andmer
    Member

    actually the main problem i’ve found is with tld’s that have <jspversion>1.1</jspversion> in them, this seems to cause problems. I change it to 1.2 and issues go away.

    #208991 Reply

    support-michael
    Keymaster

    Good feedback. The ME JSPCC compiler is JSP 1.2 spec level and that is what we have concentrated testing towards for quite sometime. I’m adding this info to a tracking record for future investigation and reference.

    #209064 Reply

    If you are testing towards JSP1.2 spec level, that is fine, but what about the core taglib TLDs from Struts? They are all jspversion 1.0. I am getting bogus errors like crazy in my JSP now when making any struts taglib calls. Am I expected to change the core TLD files in struts, inlcuding the ones you package with ME?

    #209432 Reply

    Riyad Kalla
    Member

    On this subject of OSCache and the taglib resolution, I’ve added a post here: https://www.genuitec.com/forums/topic/1st-tag-ref-in-the-jsp-gives-could-not-load-tld-closed/#post-209431

    Basically the problem is that OSCache’s TLD file doesn’t define a default URI for the tags, so MyEclipse can’t resolve them to anything. But that’s not the real issue, the OSCache TLD install instructions are clear that you should copy the TLD file from the download (its in the /etc dir) into another dir in you project, and then reference THAT file in your <taglib> entry in the web.xml file.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: specify taglibs for completion [Closed]

You must be logged in to post in the forum log in