This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes uri: http://struts.apache.org/tags-logic cannot be resolved in either web.xml or the jar files deplo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "uri: http://struts.apache.org/tags-logic cannot be resolved in either web.xml or the jar files deplo" Watch "uri: http://struts.apache.org/tags-logic cannot be resolved in either web.xml or the jar files deplo" New topic
Author

uri: http://struts.apache.org/tags-logic cannot be resolved in either web.xml or the jar files deplo

Rupal Rshah
Greenhorn

Joined: Aug 13, 2010
Posts: 19
Hello,

I am novice to the struts. I have downloaded a blank application from apache.struts.org for struts 1.3.10. After extracting it when i try to call it in browser i am getting the above error. There are no tld files in the WEb-INF folder. I have also set the classpath to struts-taglib-1.3.10.jar;

Please help me


With Regards & Thanks

Rupal
Smitesh Shinde
Ranch Hand

Joined: Feb 16, 2008
Posts: 45

1.Check if following tag libraries are present in the WEB-INF folder.

  • struts-bean.tld
  • struts-html.tld
  • struts-logic.tld
  • struts-tiles.tld


  • 2.These tag libraries need to be defined in the web.xml file as


    Question should have been posted in the Struts forum though.
    Rupal Rshah
    Greenhorn

    Joined: Aug 13, 2010
    Posts: 19
    None of these tlds are present. But i have a jar file in lib of WEB-INF. Do I need these tlds. From where can i get?
    Smitesh Shinde
    Ranch Hand

    Joined: Feb 16, 2008
    Posts: 45

    You can find these files in your Struts library folder.
    Rupal Rshah
    Greenhorn

    Joined: Aug 13, 2010
    Posts: 19
    I am not able to get any tld files from my lib of Web-INF. Please elaborate
    Bear Bibeault
    Author and ninkuma
    Marshal

    Joined: Jan 10, 2002
    Posts: 61105
        
      66

    Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


    [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
    Ankit Garg
    Sheriff

    Joined: Aug 03, 2008
    Posts: 9293
        
      17

    Rupal, if you've included the Struts library files into your web application (WEB-INF\lib folder) then you don't need to move the tld files in them to WEB-INF and you don't need to include any tag-lib directive in web.xml (that was needed for older servlet containers)...


    SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
    Rupal Rshah
    Greenhorn

    Joined: Aug 13, 2010
    Posts: 19
    I have my struts-taglib-1.3.10.jar, struts-core-1.3.10.jar and few other jar files in lib forlder of WEB-INF. I have set my classpath to this lib folder...but its giving the error as above mentioned.
    Ankit Garg
    Sheriff

    Joined: Aug 03, 2008
    Posts: 9293
        
      17

    You don't need to set the classpath to WEB-INF/lib folder, the container automatically looks for classes (in jars) in this folder. Can you check if the struts-tablib-1.3.10.jar has the required tlds in META-INF\tld folder (you can open the jar with a software like winrar)...
    Rupal Rshah
    Greenhorn

    Joined: Aug 13, 2010
    Posts: 19
    Yes I do have all the four tlds in the META-INF/TLD folder. SO then what shall i write in the web.xml . My web.xml is as under


    <?xml version="1.0" encoding="ISO-8859-1"?>

    <web-app>
    <display-name>Struts Blank Application</display-name>

    <!-- Standard Action Servlet Configuration -->
    <servlet>
    <servlet-name>action</servlet-name>


    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
      <init-param>
      :  :<param-name>config</param-name>
      :  :<param-value>/WEB-INF/struts-config.xml</param-value>
      :</init-param>
      :<load-on-startup>2</load-on-startup>
    </servlet>


    <!-- Standard Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    <taglib>
      :  : <taglib-uri>http://struts.apache.org/tags-logic</taglib-uri>
      :  :<taglib-location>/WEB-INF/libstruts-logic.tld</taglib-location>
    </taglib>



    <!-- The Usual Welcome File List -->
    <welcome-file-list>
      :  :<welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

    </web-app>
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: uri: http://struts.apache.org/tags-logic cannot be resolved in either web.xml or the jar files deplo