tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <David.K...@wamu.net>
Subject RE: JSTL and EL question - SOLVED
Date Thu, 05 Jun 2003 22:45:05 GMT
The jar file is not encrypted, it's just a zip file.  Look in the
"META-INF" directory for a ".tld" file.  This file will also tell you
what URI you need to use in the "uri" attribute of the "taglib"
directive in your JSP page.

> -----Original Message-----
> From: Schwartz, David (CHR) [mailto:David.Schwartz3@pfizer.com]
> Sent: Thursday, June 05, 2003 8:37 AM
> To: 'Tomcat Users List'
> Subject: RE: JSTL and EL question - SOLVED
> 
> Thats a great idea & much easier to implement.
> How can I determine if the jar file has the tld?
> More specifically, I'm using the jakarta dbtags. do they package it
that
> way?
> 
> -----Original Message-----
> From: Karr, David [mailto:David.Karr@wamu.net]
> Sent: Thursday, June 05, 2003 11:21 AM
> To: Tomcat Users List
> Subject: RE: JSTL and EL question - SOLVED
> 
> 
> The setup can be a little simpler than this.  The taglib jar can
contain
> the TLD for the taglib in the "META-INF" directory of the jar.  If it
is
> present there, you do not have to deploy the TLD separately.  In
> addition, if the TLD is present there, you do not have to have the
> explicit taglib map in your "web.xml" file.  In this case, your
"taglib"
> directive in the JSP page needs to specify the URI that is specified
in
> the TLD in  the taglib jar file, which is hopefully documented in the
> taglib documentation (so you don't have to open the file in the jar
> file).
> 
> If this is done correctly, you can skip steps 2 and 3 of this process.
> 
> > -----Original Message-----
> > From: Nikola Milutinovic [mailto:Nikola.Milutinovic@ev.co.yu]
> > Sent: Wednesday, June 04, 2003 10:21 PM
> > To: Tomcat Users List
> > Subject: Re: JSTL and EL question - SOLVED
> >
> > > 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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message