File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Rupal Rshah
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Smitesh Shinde
Ranch Hand
Posts: 45
Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Posts: 19
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 45
    Firefox Browser Java
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You can find these files in your Struts library folder.
     
    Rupal Rshah
    Greenhorn
    Posts: 19
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I am not able to get any tld files from my lib of Web-INF. Please elaborate
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Pie
    Posts: 64171
    83
    IntelliJ IDE Java jQuery Mac Mac OS X
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
     
    Ankit Garg
    Sheriff
    Posts: 9495
    22
    Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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)...
     
    Rupal Rshah
    Greenhorn
    Posts: 19
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 9495
    22
    Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 19
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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>
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic