facebook

JSP Editor reports error when using absolute URI in taglib

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #198537 Reply

    bsiggelkow
    Member

    I apologize if this has already been reported. I have a JSP that is using an absolute URI instead of referring to taglib references in the web.xml — however, MyEclipse doesn’t understand this and reports the following error in the JSP Editor:

    
    bad relative URL in web.xml: taglib-location=http://java.sun.com/jstl/core

    If I explicitly declare the taglib in the web.xml the error goes away.

    #198538 Reply

    Scott Anderson
    Participant

    Actually it was reported recently because our 2.6.2 release is very specification-compliant and this has caused some confusion. The issue is really caused because your usage of taglibs isn’t really in conformance with the JSP spec. This thread (https://www.genuitec.com/forums/topic/upgrade-to-myeclipse-2-6-2-not-an-improvement-closed/) runs it all down for you.

    –Scott
    MyEclipse Support

    #198551 Reply

    bsiggelkow
    Member

    Hmm … I think my usage does conform to the JSP 1.2 specification [JSP.7.3.4] . Does MyEclipse support this specification?

    JSP.7.3.4 Implicit Map entries from TLDs
    The taglib map described in web.xml is extended with new entries extracted
    from TLD files in the Web Application. The new entries are computed as follows:
    • Each TLD file is examined. If it has a <uri> element, then a new <taglib> element
    is created, with a <taglib-uri> subelement whose value is that of the <uri>
    elemement, and with a <taglib-location> subelement that refers to the TLD file.
    • If the created <taglib> element has a different <taglib-uri> to any in the taglib
    map, it is added.
    This mechanism provides an automatic URI to TLD mapping as well as
    supporting multiple TLDs within a packaged JAR. Note that this functionality
    does not require explicitly naming the location of the TLD file, which would
    require a mechanism like the jar: protocol.
    Note also that the mechanism does not add duplicated entries.

    #198555 Reply

    support-michael
    Keymaster

    Is the taglib that your are referencing packaged as a JAR or is it the TLD exposed under the WEB-INF dir? I am assuming it is a packaged TLD since it has been my understanding that is the purpose for the implicit mechanism you cite from the spec.

    Michael
    MyEclipse Support

    #198557 Reply

    No Operation
    Member

    The implicit loading works for me.

    Guess the problem is the URI vs URL.

    using an absolute URI

    As far as I understand, URIs are relative, everywhere in JSPs.

    absolute URI

    does not exist.

    =>
    [spec]
    JSP.2.2.1 Relative URL Specifications
    Elements may use relative URL specifications, called “URI paths” in the Servlet 2.3
    specification.
    [/spec]

    NOP

    #198565 Reply

    bsiggelkow
    Member

    Yes, the TLD is packaged in a jar.
    @support wrote:

    Is the taglib that your are referencing packaged as a JAR or is it the TLD exposed under the WEB-INF dir? I am assuming it is a packaged TLD since it has been my understanding that is the purpose for the implicit mechanism you cite from the spec.

    Michael
    MyEclipse Support

    #198566 Reply

    support-michael
    Keymaster

    Thanks for the feedback. We are researching this now.

    Michael
    MyEclipse Support

    #198674 Reply

    SolNet
    Member

    I am also having this problem.
    I have the JSTL package as “standard.jar” located in WEB-INF/lib.
    Within this jar is c.tld (the normal tld for the “core” of JSTL) located in the meta-inf directory of the standard.jar file.

    the JSP editor complains that the
    “bad relative URL in web.xml: taglib-location = http://java.sun.com/jstl/core&#8221;
    But If I deploy the app – it works – Tomcat works correctly.

    If I put a copy of the c.tld in the WEB-INF directory and change the @taglib uri=”…” to reference this file – the editor likes it, but it confuses tomcat – and is not really valid to the spec.

    the otherthing is, the @taglib tag is meant to support URI and “TAGDIR” – but the JSP editor does not understand this attribute of taglib.

    let me know if you need more info

    Nick

    #198704 Reply

    support-michael
    Keymaster

    We have a fix available that address this problems discussed in this thread. We expect to release it as part of maintenance or minor release within the next 2 weeks.

    Michael
    MyEclipse Support

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: JSP Editor reports error when using absolute URI in taglib

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