facebook

Specifying TLDs above WEB-INF folder

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

    aka3
    Member

    Hi MyEclipse

    I know this issue has been discussed in other support issues, but I do
    not get the point ….

    I have made project based on an older project I’m working with

    Here we uses taglibs

    like
    <%@taglib uri=”/package/cmd/deployment.tld” prefix=”deployment”%>

    1) A directory package is on level with the WEB-INF directory
    2) under here in cmd/ is a file called deployment.tld

    But MyEclipse complains (in a red-cross mark)
    Could not load TLD for uri=/package/cmd/deployment.tld

    I have tried nearly anything
    1) putting taglib entries into web.xml

    <taglib>
    <taglib-uri>/package/cmd/deployment.tld</taglib-uri>
    <taglib-location>/package/cmd/deployment.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>deployment.tld</taglib-uri>
    <taglib-location>/deployment.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/deployment.tld</taglib-uri>
    <taglib-location>/deployment.tld</taglib-location>
    </taglib>

    2) Changed the taglib directive to
    <%@taglib uri=”/deployment.tld” prefix=”deployment”%>
    or
    <%@taglib uri=”deployment.tld” prefix=”deployment”%>

    3) put the file delployment.tld all over…

    BUT NOTHING HELPS …….

    Question:
    X) do tld files need to be declared in web.xml ?

    Y) doesn’t uri=”/package/cmd/deployment.tld” mean that there must be
    a file in a directory package/… where package and WEB-INF are on the same level. ?

    Finally:
    MyEclipse was hopefully designed to help developers, so instead of just saying that it cannot find a file, it could be very nice to have myEclipse to
    have a file-dialoque where the developer can pick among files.. (standard feature in weblogics workshop)

    With Confusions from

    Anders Kr.

    #208539 Reply

    support-michael
    Keymaster

    It is my understanding that TLDs are only required to reside under the web-root, not the suggested <web-root>/WEB-INF folder. I replicated similar behavior and have submitted a problem report for further research and resolution.

    Out of curiousity, why do you make your TLDs publicly accessible?

    #208541 Reply

    Riyad Kalla
    Member

    X) do tld files need to be declared in web.xml ?

    The TLD either needs to be referenced in the web.xml file, or in a JAR files WEB-INF dir (like Struts).

    Y) doesn’t uri=”/package/cmd/deployment.tld” mean that there must be
    a file in a directory package/… where package and WEB-INF are on the same level. ?

    Yes I believe you are correct. Why don’t you try this:

    
    <taglib>
        <taglib-uri>/tags/deployment</taglib-uri>
        <taglib-location>/package/cmd/deployment.tld</taglib-location>
    </taglib>
    

    Then use “/tags/deployment” in your JSP page? In the mean time I’ll send your situation on to the devs to see why it didn’t work (it seems it should have)

    #211217 Reply

    tgordon
    Member

    Hi,
    I have also set up a project based on an already working project. My jsp pages cannot resolve the taglib references although they work in production. An example:

    jsp page
    <%@ taglib uri=”webflow.tld” prefix=”webflow” %>

    web.xml
    <taglib>
    <taglib-uri>webflow.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/webflow_taglib.jar</taglib-location>
    </taglib>

    The jar file exists in the designated location and has a .tld in the META-INF directory.

    This happens for many tags in many jsps. I have restarted many times; nothing helps. And, by the way, some external code imports are not recognized in jsps either, while some code from the same libraries are recognized!

    I am using Eclipse 3.0 and myEclipse 3.8 beta2 on Windows 2000 SP4. I am running Eclipse with jdk 1.4.2.

    #211229 Reply

    Riyad Kalla
    Member

    tgordon,
    Your taglib mappings are invalid, go ahead and remove them (can’t reference a JAR AFAIK) and then open the TLD file in your META-INF folder, and look at the predefined URIs, then just use that in your JSP pages.

    If the TLD files do not define a URI, then copy the TLD out of the JAR into your WEB-INF folder, and re-add valid taglib entries (pointing to the TLD file), that should do the trick.

    #211231 Reply

    Riyad Kalla
    Member
Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Specifying TLDs above WEB-INF folder

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