I am looking for struts tld files. I could not find the files with the explicit extension "tld" Could you please let me know about the site where I can get them from.
I am following a tutorial which asked to put the *.tld files in the WEB-INF directory. in this case which jar file should I put in the WEB-INF directory
A Struts tutorial? Or a general tutorial on tag libraries?
If it's a Struts tutorial, then I would have serious doubts as to its credibility, but I will let the more Struts-savvy members make that judgement. In modern web applications, it is never necessary to extract the tld files from the jar files and configure them "by hand". [ July 26, 2008: Message edited by: Bear Bibeault ]
Do you mean that the tld files are included in the jar files within the lib directory?
If in a jsp file I refer to a tld file this way : "<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>" : - Should not I put the struts-logic.tld file under the WEB-INF directory? - If the tld files are included within the jar files (under the lib directory), How Should I refer them from the jsp file ?
Firstly, which version of Struts are you trying to set up?
I'm going to let someone more knowledgeable regarding Struts take over at this point, as early versions may have been more primitive.
But generally, in modern web apps you refer to TLDs through their published URIs, not their location on disk.
Again, I'll let a Struts expert comment on the specific version of Struts that you are using. What do the setup instructions in the Struts documentation say to do?
The tutorial you're following is for older versions of Struts. Version 1.2.9 and below require TLD files in the WEB-INF directory, but any version later than 1.2.9 (the current one is 1.3.8) has the TLD files contained in the struts-taglib-1.3.8.jar file that comes with the download.
Your tutorial will no doubt give you incorrect taglib definitions for the JSP. Below are the correct ones: