RE: Declaration of the Struts tag librairies

2003-03-24 Thread Sri Sankaran
Looking at the documentation for the web.xml, it reads:

taglib-uri:
  The taglib-uri element describes a URI, relative to the 
  location of the web.xml document, identifying a Tag 
  Library used in the Web Application.
taglib-location:
  the taglib-location element contains the location (as a 
  resource relative to the root of the web application) 
  where to find the Tag Libary Description file for the 
  tag library. 

So, for example, if your web.xml has

taglib
  taglib-urihttp://www.acme.com/logic/taglib-uri
  taglib-location/WEB-INF/tlds/struts-logic.tld/taglib-location
/taglib

you can place the taglib directive

%@ taglib uri=http://www.acme.com/logic; prefix=logic %

in your JSP.  The web.xml taglib provides a level of indirection thereby allowing 
you to say, move your tlds or use a newer version without having to update all your 
JSPs.

I *do* have every taglib that I use in my application declared in the web.xml.

Sri

-Original Message-
From: Heligon Sandra [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2003 4:20 AM
To: '[EMAIL PROTECTED]'
Subject: Declaration of the Struts tag librairies 



I develop a web application with Tomcat4.0.1 and the Struts framework.
In the web.xml there is an optional taglib element. I don't understand very 
well the aim of this element. 
In the beginning of the development I added the following libraries:

taglib 
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri 
taglib-
location/WEB-INF/tld/struts-bean.tld/taglib-location
/taglib 
taglib 
taglib-uri/WEB-INF/struts-html.tld/taglib-uri   

taglib-location/WEB-INF/tld/struts-html.tld/taglib-location 
/taglib 
and in the JSP that use these libraries I added in the header: 
%@ taglib uri=/WEB-INF/tld/struts-bean.tld prefix=logic % 
%@ taglib uri=/WEB-INF/tld/struts-html.tld prefix=logic %
 In the continuation of my developments I used new libraries which I did not 
declare in web.xml 
But in the JSP that use these new libraries I wrote a line 
%@ taglib uri=/WEB-INF/tld/struts-logic.tld prefix=logic % and it works, 
why ?
Is it with the fact that the two directives are identical? 
I do'nt understand well which is the aim of the taglib element ? Do I must 
declare each library used in the
Struts application in the web.xml file ? 




As of February 12th, 2003 Thomson unifies its email addresses on a worldwide basis. 
Please note my new email address: [EMAIL PROTECTED] 

http://www.thomson.net/ 


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



Re: Declaration of the Struts tag librairies

2003-03-24 Thread David Graham
Deployment of taglibs in a Servlet 2.3 container such as Tomcat 4 is 
extremely simple.  Add this line to your JSP:
%@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html %

This allows you to use the Struts html taglib.  You don't need to modify 
web.xml or copy tld files anywhere.

David



From: Heligon Sandra [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: Declaration of the Struts tag librairies Date: Mon, 24 Mar 2003 
10:19:57 +0100

I develop a web application with Tomcat4.0.1 and the Struts
framework.
In the web.xml there is an optional taglib element. I don't
understand very well the aim of this element.
In the beginning of the development I added the following libraries:
taglib
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
taglib-
location/WEB-INF/tld/struts-bean.tld/taglib-location
/taglib
taglib
taglib-uri/WEB-INF/struts-html.tld/taglib-uri
taglib-location/WEB-INF/tld/struts-html.tld/taglib-location
/taglib
and in the JSP that use these libraries I added in the header:
%@ taglib uri=/WEB-INF/tld/struts-bean.tld prefix=logic %
%@ taglib uri=/WEB-INF/tld/struts-html.tld prefix=logic %
 In the continuation of my developments I used new libraries which I
did not declare in web.xml
But in the JSP that use these new libraries I wrote a line
%@ taglib uri=/WEB-INF/tld/struts-logic.tld prefix=logic % and
it works, why ?
Is it with the fact that the two directives are identical?
I do'nt understand well which is the aim of the taglib element ? Do
I must declare each library used in the
Struts application in the web.xml file ?


As of February 12th, 2003 Thomson unifies its email addresses on a 
worldwide
basis.
Please note my new email address: [EMAIL PROTECTED]

http://www.thomson.net/



_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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