Ah, my bad. I thought you were declaring the tab library in the WEB.INF file kind of like you can declare your database connection:

        <context-param>
                <param-name>
                        javax.servlet.jsp.jstl.sql.dataSource
                </param-name>

<param-value>
jdbc:mysql://localhost:3307/ nfl2003,org.gjt.mm.mysql.Driver,username,password
</param-value>
</context-param>


I was thinking that you could declare it on the application level and then not use the <%@ taglib %> in the JSP pages.

Thanks for clearing that up,

Jeff


On Wednesday, June 4, 2003, at 10:21 PM, Nikola Milutinovic wrote:


I thought I liked the idea of having the taglib in the web.xml file.
When I try it I'm getting "This absolute uri
(http://java.sun.com/jstl/core) cannot be resolved in either web.xml or
the jar files deployed with this application". Do I have to download it
somewhere in order to use it in the web.xml file? Any ideas?

:-)


OK, four things when dealing with ANY tag library:

1. PLACE JAR FILES

Place JAR files that hold implementation of the tag library in a directory where Tomcat will pick it up. Either make it "WEB-INF/lib/" (private) or "${CATALINA_HOME}/shared/lib" (all web-apps will have access to it). You could place it in "${CATALINA_HOME}/common/lib", but I don't see the point in Tomcat having access to those JARs. There was a discussion recently naming pros/cons of each choice (Craig), so look up the archives.

2. PLACE TLD

Place TLD files (Tag Library Descriptor) in either "WEB-INF/" or (if I recall correctly) "WEB-INF/taglibs/". The first placement will require for "location" in "web.xml" file to be absolute: "/WEB-INF/<name>.tld", while the second will allow for relative links: "<name>.tld"

3. DECLARE TLD IN WEB.XML

This part you've already seen.

<taglib>
   <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
   <taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>

4. DECLARE TLD USAGE IN JSP

This you've seen

<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>

The prefix is up to you.

Nix.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to