How to fix Log error?

Asked

Viewed 119 times

0

I am using Struts 2 in Tomcat, and I can run the code. However, I am having this error in the log.

java.lang.Classnotfoundexception: org.apache.Struts.action.Actionservlet

And I have no idea what it is. I’ve done some research and I haven’t found the solution yet. Can you help me, please?

  • What would be the mistake?

  • The error you give me is: java.lang.Classnotfoundexception: org.apache.Struts.action.Actionservlet

  • 4

    @Iris Could you post the full stack trace? (the location where it shows the errors in detail) And if the stack trace indicates a line of your code could post tb the snippet of the code where the problem is?

  • 1

    Did you put Struts 2 Lib in the correct folder? (Web-Inf/lib)

  • 1

    Iris, Welcome(a) to Stack Overflow in English! As understood by the @adelmo00 comment, the problem may be caused by the lack of Struts libraries (Jars) in the directory lib application. You could edit your question and add the list of libraries present in your folder WEB-INF/lib?

1 answer

1

Your problem really must be the lack of the Struts library in your project’s libpath: if you are using Maven in your project add the following dependency in pom.xml

<dependency>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts-core</artifactId>
    <version>1.3.10</version>
</dependency>

or otherwise import it into classpath by eclipse, the jar is on the following link. http://central.maven.org/maven2/org/apache/struts/struts-core/1.3.10/struts-core-1.3.10.jar

Browser other questions tagged

You are not signed in. Login or sign up in order to post.