struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Raeburn" <st...@ninsky.com>
Subject RE: Struts-bean.tld
Date Fri, 04 Jul 2003 11:31:50 GMT
The meta-inf directory is within the jar that contains your taglib(s).

For struts, the standard taglibs are contained within struts.jar (open it
with Winzip or similar to see the internal directory structure)

Steve

> -----Original Message-----
> From: Jagannayakam [mailto:jagannayakam@aztec.soft.net]
> Sent: July 4, 2003 3:52 AM
> To: Struts Users Mailing List
> Subject: RE: Struts-bean.tld
>
>
> Thanks Steve .
>
> In case of  In JSP 1.2 / Servlet API 2.3 can u tell me the exact
> location of
> the Meta-inf directory and which jar file.
>
>
> Thanks,
> Jagan.
>
> -----Original Message-----
> From: Steve Raeburn [mailto:steve@ninsky.com]
> Sent: Friday, July 04, 2003 4:03 PM
> To: Struts Users Mailing List
> Subject: RE: Struts-bean.tld
>
>
> The URI in the JSP doesn't *directly* tell the JSP where to find the tld.
> It's just a reference used to look up the actual location in
> web.xml. Often
> the URI is the same as the path to the tld but it doesn't have to be.
>
> In JSP 1.1 / Servlet API 2.2 you had to configure tag libraries in the
> web.xml file
>
>   <taglib>
>     <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
>     <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>   </taglib>
>
> and then use the <taglib-uri> value in a JSP to enable it to lookup the
> taglib descriptor (.tld) location
>
>   <%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
>
> finally, the name of the actual tag class is found in the taglib
> descriptor
> (.tld) file
>
>   <name>write</name>
>   <tagclass>org.apache.struts.taglib.bean.WriteTag</tagclass>
>
> In JSP 1.2 / Servlet API 2.3, life gets a little easier. You no
> longer have
> to configure tag libraries in web.xml *or* have the .tld files in your
> WEB-INF directory.
>
> The servlet container can find tlds in a tag library jar file if the they
> are placed in a META-INF/tlds directory (within the jar). To use
> the taglib
> all you have to do is reference the taglib URI in your jsp and
> make sure the
> taglib jar is on your classpath.
>
>   <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
> prefix="bean"
> %>
>
> Again, although the URI looks like it points to a website it is just a
> string that matches the on in the tld and uniquely identfies the tag
> library.
>
> Probably more information than you needed ;-)
>
> Steve
>
>
> > -----Original Message-----
> > From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
> > Sent: July 4, 2003 2:56 AM
> > To: Struts Users Mailing List; Billy Ng
> > Subject: RE: Struts-bean.tld
> >
> >
> > The tags you are referring to are part of the struts-bean tag library.
> > A .tld file is whats known as a 'tag library descriptor' (or
> words to that
> > effect) - tld files being used by JSP to define tag libraries -
> > in this case
> > its a definition for the struts bean taglib.
> >
> > When you wish to use the bean taglib in a JSP page you use the directive
> > <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> > at the top of your page, the uri of course telling JSP where to
> > find the tld
> > file (you will note the lack of the .tld suffix though).
> >
> >
> >
> > -----Original Message-----
> > From: Billy Ng [mailto:kwokng@earthlink.net]
> > Sent: Friday, 4 July 2003 17:27
> > To: Struts Users Mailing List
> > Subject: Re: Struts-bean.tld
> >
> >
> > I normally use it to get the value from the properties file.
> >
> > <a href="<bean:message key="home.link"/>"
> >
> > In the Applications.properties file, you can define
> >
> > home.link=http://www.home.com
> >
> > How handy, right?  You should look at the Struts' doc
> >
> > Billy Ng
> >
> > ----- Original Message -----
> > From: "Jagannayakam" <jagannayakam@aztec.soft.net>
> > To: "Struts Users Mailing List (E-mail)"
> <struts-user@jakarta.apache.org>
> > Sent: Friday, July 04, 2003 2:11 AM
> > Subject: Struts-bean.tld
> >
> >
> > > What does the struts-bean.tld do .
> > >
> > > Regards,
> > > Jagan.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>



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


Mime
View raw message