File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes tld files for struts 1.3.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "tld files for struts 1.3.5" Watch "tld files for struts 1.3.5" New topic
Author

tld files for struts 1.3.5

lynn fann
Ranch Hand

Joined: Oct 15, 2006
Posts: 115
how do i declare the tld for struts 1.3.5. i using the following method but it cant work.


web.xml:
<taglib>
<taglib-uri>http://struts.apache.org/tags-bean</taglib-uri>
<taglib-location>/META-INF/tld/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://struts.apache.org/tags-html</taglib-uri>
<taglib-location>/META-INF/tld/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://struts.apache.org/tags-logic</taglib-uri>
<taglib-location>/META-INF/tld/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://struts.apache.org/tags-tiles</taglib-uri>
<taglib-location>/META-INF/tld/struts-tiles.tld</taglib-location>
</taglib>

jsp page:
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

what goes wrong??? i try to open the jar files, but i cant find any .tld files. Where are the tld places?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In Struts 1.3.5 you do not need to declare the taglibs in web.xml. Just take out all the taglib references from your web.xml file.

Struts 1.3.5 uses the newer style taglib URIs where the URI used is actually a namespace, and is found by searching in the META-INF directories of the jar files. As long as you have struts-taglib-1.3.5.jar in your /lib diretory, the references will be resolved properly.


Merrill
Consultant, Sima Solutions
lynn fann
Ranch Hand

Joined: Oct 15, 2006
Posts: 115
i get the following error, when deploy in tomcat4.1:

org.apache.jasper.JasperException: This absolute uri (http://struts.apache.org/tags-bean) cannot be resolved in either web.xml or the jar files deployed with this application
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Are you sure that struts-taglib-1.3.5.jar exists in the WEB-INF/lib directory of your web application?
lynn fann
Ranch Hand

Joined: Oct 15, 2006
Posts: 115
i have check my web application. the file is there. In netbean when i run the project, i can view the pages and everythng works fine. Is only that when i copy and war file and deploy it in tomcat, then i will have the error.
 
Consider Paul's rocket mass heater.
 
subject: tld files for struts 1.3.5
 
Similar Threads
why my application can't detect struts tld files ?
locating tld files in Struts -all.zip distribution
Struts 1.3.5 Tiles Issue
error in struts-html.tld file
Why: File "/WEB-INF/struts-html.tld" not found.