This discussion is archived
3 Replies Latest reply: Dec 21, 2012 9:03 AM by david.karr RSS

No tag library could be found with this URI. Possible causes could be that

819714 Newbie
Currently Being Moderated
Hi,
i have got following err while run on weblogic 10.3, please could help me...

ogin.jsp:3:5: Invalid tag library.
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
^----^
login.jsp:3:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
^----^
login.jsp:3:5: Invalid tag library.
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
^----^
login.jsp:3:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
^----^
login.jsp:4:5: Invalid tag library.
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean" %>
^----^
login.jsp:4:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean" %>
^----^
login.jsp:4:5: Invalid tag library.
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean" %>
^----^
login.jsp:4:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean" %>
^----^
login.jsp:5:5: Invalid tag library.
<%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic" %>
^----^
login.jsp:5:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic" %>
^----^
login.jsp:5:5: Invalid tag library.
<%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic" %>
^----^
login.jsp:5:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic" %>
^----^
login.jsp:6:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
^----^
login.jsp:6:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
^----^
login.jsp:7:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
^----^
login.jsp:7:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
^----^
  • 1. Re: No tag library could be found with this URI. Possible causes could be that
    david.karr Pro
    Currently Being Moderated
    I can answer this in two different ways.

    You need to understand how tag libraries are used. The "uri" attribute value has to match with the "uri" property in the ".tld" descriptor inside a taglib jar in your WEB-INF/lib directory. This is the preferred method. Alternatively, if you've extracted the ".tld" file from the taglib jar, you can specify a uri mapping in your web.xml file.

    You can read about the use of tag libraries in WebLogic at [http://download.oracle.com/docs/cd/E17904_01/web.1111/e13712/toc.htm] .

    Despite that, I can say authoritatively that you shouldn't be using the "struts-el" tag library in WebLogic 10.3 (I wrote it, so I know). It was intended to be used with JSP 1.2 environments. If you use it in JSP 2.0 and newer environments, it not only won't do what you expect, it will likely cause unexpected problems.
  • 2. Re: No tag library could be found with this URI. Possible causes could be that
    773020 Newbie
    Currently Being Moderated
    then what should I use in place of it?

    How do we make sure that web apps work in WL 10?

    Should I replace all of them with URI with http [Example = uri="http://www.com.telus/frameworks/tags/web/html-el" ]or keeo them in the tag folder[example =uri="/tags/struts-bean"] ?


    After deploying my web app in WL10 , a few of links are not working , if you click on a value in a drop down it should direct to some screen. They are broken. Is it because of it? It shows some object not found exceptions in browser. It was working fine in WL8.

    What could be error message if we do not use right version or uri for taglibs in WL10?

    I have entries in JSP as follows

    <%@ taglib uri="/tags/struts-bean" prefix="bean"%>
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    <%@ taglib uri="http://www.com.telus/frameworks/tags/web/html-el" prefix="html"%>
    <%@ taglib uri="/tags/jstl-c" prefix="c"%>
    <%@ taglib uri="/tags/jstl-fmt" prefix="fmt"%>
    <%@ taglib uri="/tags/struts-html" prefix="html"%>
    <%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>

    the above tld files are downloaded to \web-content\WEB-INF\tld and are defined in web.xml


    And entries in web.xml like below
    <taglib>
              <taglib-uri>/tags/struts-bean</taglib-uri>
              <taglib-location>
                   /WEB-INF/tld/struts-bean-1.2.4.tld
              </taglib-location>
         </taglib>

         <taglib>
              <taglib-uri>/tags/struts-bean-el</taglib-uri>
              <taglib-location>
                   /WEB-INF/tld/struts-bean-el-1.2.4.tld
              </taglib-location>
         </taglib>

         <taglib>
              <taglib-uri>/tags/struts-html</taglib-uri>
              <taglib-location>
                   /WEB-INF/tld/struts-html-1.2.4.tld
              </taglib-location>
         </taglib>
    <taglib>
              <taglib-uri>/tags/struts-logic</taglib-uri>
              <taglib-location>
                   /WEB-INF/tld/struts-logic-1.2.4.tld
              </taglib-location>
         </taglib>

         <taglib>
              <taglib-uri>/tags/struts-logic-el</taglib-uri>
              <taglib-location>
                   /WEB-INF/tld/struts-logic-el-1.2.4.tld
              </taglib-location>
         </taglib>
         <taglib>
              <taglib-uri>/tags/struts-tiles</taglib-uri>
              <taglib-location>
                   /WEB-INF/tld/struts-tiles-1.2.4.tld
              </taglib-location>
         </taglib>

         <taglib>
              <taglib-uri>/tags/struts-tiles-el</taglib-uri>
              <taglib-location>
                   /WEB-INF/tld/struts-tiles-el-1.2.4.tld
              </taglib-location>
         </taglib>
  • 3. Re: No tag library could be found with this URI. Possible causes could be that
    david.karr Pro
    Currently Being Moderated
    In general, it's best for "taglib" directives in your JSP pages to reference the URI specified in the taglib descriptor in the taglib jar. That will also mean that you have NO "taglib" elements in your web.xml.

    For instance, if you open up your "struts.jar" (or whatever) and find the ".tld" file and look at it, you'll see a "/taglib/uri" element. That is the value you should use in your JSP pages, and you don't need a "taglib" element in your web.xml. You also don't need to extract the ".tld" file from the taglib jar.

    And to reiterate the point I made on this thread a long time ago, do NOT use the "struts-el" tag library any more. It had a purpose with JSP 1.2, but not with JSP 2.0 and later.

    Concerning that tag library you reference from "telus" (I have no idea what that is), if you have a taglib jar corresponding to that tag library, open up the taglib jar and inspect the .tld and find the "/taglib/uri" element. You might find that you've just misspelled the URI (like switching "com" and "telus"). However, I'm suspicious of that base name of "html-el". That sounds like it's using the same strategy that "struts-el" was using to evaluate expressions, which will NOT work in WebLogic 10.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points