Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts taglibs - references - doubt

 
Manuel Jordan
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" %>
 
Manuel Jordan
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i hope that this option work with struts 1.2.9

regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic