dcsimg
Taglib element in the web.xml file
5 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   HELIGON_Sandra
Posted On:   Thursday, March 20, 2003 03:05 AM

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: /WEB-INF/struts-bean.tld /WEB-INF/tld/struts-bean.tld /WEB-INF/struts-html.tld /WEB-INF/tld/struts-html.tld 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 libraires which I did not declare in web.xml But in the JSP tha   More>>

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:


/WEB-INF/struts-bean.tld
/WEB-INF/tld/struts-bean.tld


/WEB-INF/struts-html.tld
/WEB-INF/tld/struts-html.tld


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 libraires which I did not declare in web.xml But in the JSP that use
these new librairies I wrote a line

<%@ taglib uri="/WEB-INF/tld/ .tld" prefix=" " %>

and it works.

Thus I reiterate my question which is the aim of the taglib
element.

I have a second question how must one interpret in the web.xml file the line



We do a reference to an external file, isn't it ?
In what that does result?
is an access to the site http://java.sun.com made permanently?

It is undoubtedly preferable of place a copy of the file web-app_2_3.dtd on the local disc and to refer to this file. Is this the case?

Thanks a lot in advance
Sandra

   <<Less

Re: Taglib element in the web.xml file

Posted By:   Phillip_Carbis  
Posted On:   Monday, March 24, 2003 09:02 AM

I think (!) the purpose of the '' element is loose coupling for the actual location of the tag library descripter and the reference you use to it within your JSP pages. So therefore if for instance you were buying the tag library from a vendor, who then changed the name of the descriptor, you only have to change this in one place - web.xml.


Similarly, if the location of a remote tag library descriptor changed you only have to change it in one place. Hope this helps.......

Re: Taglib element in the web.xml file

Posted By:   Phillip_Carbis  
Posted On:   Monday, March 24, 2003 09:02 AM

I think (!) the purpose of the '' element is loose coupling for the actual location of the tag library descripter and the reference you use to it within your JSP pages. So therefore if for instance you were buying the tag library from a vendor, who then changed the name of the descriptor, you only have to change this in one place - web.xml.


Similarly, if the location of a remote tag library descriptor changed you only have to change it in one place. Hope this helps.......

Re: Taglib element in the web.xml file

Posted By:   Phillip_Carbis  
Posted On:   Monday, March 24, 2003 09:01 AM

I think (!) the purpose of the '' element is loose coupling for the actual location of the tag library descripter and the reference you use to it within your JSP pages. So therefore if for instance you were buying the tag library from a vendor, who then changed the name of the descriptor, you only have to change this in one place - web.xml.


Similarly, if the location of a remote tag library descriptor changed you only have to change it in one place. Hope this helps.......

Re: Taglib element in the web.xml file

Posted By:   Phillip_Carbis  
Posted On:   Monday, March 24, 2003 09:01 AM

I think (!) the purpose of the '' element is loose coupling for the actual location of the tag library descripter and the reference you use to it within your JSP pages. So therefore if for instance you were buying the tag library from a vendor, who then changed the name of the descriptor, you only have to change this in one place - web.xml.


Similarly, if the location of a remote tag library descriptor changed you only have to change it in one place. Hope this helps.......

Re: Taglib element in the web.xml file

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, March 20, 2003 07:16 AM

I think your question is an XML question -- about the DOCTYPE ("document type declaration"), and the "public identifier" URI, which specifies the location of the DTD used by the XML parser, to validate the document. Look up these terms in some basic XML FAQ's.



I think (?) basically you are asking how to change the public identifier URI, to point to a local copy of the resource for the DTD, instead of the remote one at java.sun.com.

About | Sitemap | Contact