permaculture playing cards*
The moose likes Struts and the fly likes Struts taglibs - references - doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts taglibs - references - doubt" Watch "Struts taglibs - references - doubt" New topic
Author

Struts taglibs - references - doubt

Manuel Jordan
Ranch Hand

Joined: Sep 29, 2006
Posts: 131
Hello guys, i saw in most examples when work with struts only, this
i must declare in the web.xml (for tomcat) the follow taglibs



in for any jsp file (with/out tiles) these lines


ok i undestood this and work and i dont have any problem

the doubt is the next, this behaviour is with struts-spring(i dont know if exist with struts only):

i can avoid the declaration in the web.xml of the tags <taglib>, but i must still have the folder path
/WEB-INF/tlds/*.tld in my application,i known that all the tld files are in the
struts.jar

so how change <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> to make reference
to the struts-logic.tld file that is incorporate in the struts.jar and of course this should avoid the
folder and files in /WEB-INF/tlds/*.tld

thanks so much for advanced

Manuel Jordan


kill your pride, share your knowledge with all
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you want to refer to the TLDs in the struts.jar file, use their namespace URIs. Read my response in this thread for an explanation of how that works.

For example, to use the html taglib that is contained in the struts.jar file, you would code the following:

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>


Merrill
Consultant, Sima Solutions
Manuel Jordan
Ranch Hand

Joined: Sep 29, 2006
Posts: 131
hello Merrill
thanks for the reply, your link was useful

but i have a doubt, i saw the war files of the bin distribution of Struts, and all the samples work with the clasic way (web.xml and declaration etc etc)

the obvious question is, where i can find an example of this (make a reference to the jar file) or documentation/tutorial but from the same source???

thanks for your time
i work with struts 1.2.9, because is need it by Spring
[ November 06, 2006: Message edited by: Manuel Jordan ]
Manuel Jordan
Ranch Hand

Joined: Sep 29, 2006
Posts: 131
i hope that this option work with struts 1.2.9

regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts taglibs - references - doubt