JSP parse error "No URI for taglib" when using tagdir attribute - Weblogic

This is a discussion on JSP parse error "No URI for taglib" when using tagdir attribute - Weblogic ; Hi, I'm trying to use Jakarta JSTL 1.0 with BEA WebLogic 8.1 so I can work with tag files. I've put the jars (jstl.jar & standard.jar) in my webapp's WEB-INF/lib, added the following to my web.xml: http://java.sun.com/jstl/core /WEB-INF/c.tld and put ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: JSP parse error "No URI for taglib" when using tagdir attribute

  1. JSP parse error "No URI for taglib" when using tagdir attribute

    Hi,

    I'm trying to use Jakarta JSTL 1.0 with BEA WebLogic 8.1 so I can work with tag files. I've put the jars (jstl.jar & standard.jar) in my webapp's WEB-INF/lib, added the following to my web.xml:


    http://java.sun.com/jstl/core
    /WEB-INF/c.tld


    and put the follwing two lines at the top of my JSP:

    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="h" tagdir="/WEB-INF/tags/mytags" %>

    When I browser to my JSP, I get:

    Parsing of JSP File '<...>.jsp' failed:
    ----------------------------------------
    <...>.jsp(5): No URI for taglib
    probably occurred due to an error in <...>.jsp line 5:
    <%@ taglib prefix="h" tagdir="/WEB-INF/tags/mytags" %>

    My setup is pretty much straight out of the textbook, so what's wrong? Are tag files, and therefore this form of the taglib directive, not supported by WebLogic?

    Andrew

  2. Re: JSP parse error "No URI for taglib" when using tagdir attribute

    Andrew Bickerton wrote:
    > Hi,
    >
    > I'm trying to use Jakarta JSTL 1.0 with BEA WebLogic 8.1 so I can work with tag files. I've put the jars (jstl.jar & standard.jar) in my webapp's WEB-INF/lib, added the following to my web.xml:
    >
    >
    > http://java.sun.com/jstl/core
    > /WEB-INF/c.tld
    >

    >
    > and put the follwing two lines at the top of my JSP:
    >
    > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    > <%@ taglib prefix="h" tagdir="/WEB-INF/tags/mytags" %>
    >
    > When I browser to my JSP, I get:
    >
    > Parsing of JSP File '<...>.jsp' failed:
    > ----------------------------------------
    > <...>.jsp(5): No URI for taglib
    > probably occurred due to an error in <...>.jsp line 5:
    > <%@ taglib prefix="h" tagdir="/WEB-INF/tags/mytags" %>
    >
    > My setup is pretty much straight out of the textbook, so what's wrong? Are tag files, and therefore this form of the taglib directive, not supported by WebLogic?
    >
    > Andrew



    81 doesn't support/implement the JSP 2.0 spec (which adds tag files)

    -- Nagesh

  3. Re: JSP parse error "No URI for taglib" when using tagdir attribute

    As was noted, you can't use features only in JSP 2.0 in WebLogic 8.1. You can only use the JSTL version 1.0.

    In addition, as a minor point, you don't need to specify the taglib in your web.xml. In fact, the way you've specified it might cause additional problems (your path to the TLD probably doesn't exist). You just need the taglib jar (which contains the TLD file) and the taglib directive in your JSP page (using the URI that matches the URI in the TLD in the taglib jar).

+ Reply to Thread