title: Java Struts2 (Action class not found)
body: <p>The error which I am getting. It was running all fine a day before but when open it today I get the following errors.</p>
  
  <pre><code>Action class [com.tutorialspoint.struts2.HelloWorldAction] not found - action - file:/C:/Users/sai/Struts2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloWorldStruts2/WEB-INF/classes/struts.xml:10:30
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:374)
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:329)
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:429)
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
      at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
      at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
      at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
      at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
      at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
      at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
      at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:105)
      at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4828)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5508)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p><strong>My index.jsp page</strong></p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
     pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ taglib prefix="s" uri="/struts-tags"%&gt;
     &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
  "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Hello World&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;h1&gt;Hello World From Struts2&lt;/h1&gt;
     &lt;form action="hello"&gt;
        &lt;label for="name"&gt;Please enter your name&lt;/label&gt;&lt;br/&gt;
        &lt;input type="text" name="name"/&gt;
        &lt;input type="submit" value="Say Hello"/&gt;
     &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>My struts.xml file</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE struts PUBLIC
     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
     "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
     &lt;struts&gt;
        &lt;constant name="struts.devMode" value="true" /&gt;
        &lt;package name="helloworld" extends="struts-default"&gt;
           &lt;action name="hello" 
              class="com.tutorialspoint.struts2.HelloWorldAction"
              method="execute"&gt;
              &lt;result name="success"&gt;/HelloWorld.jsp&lt;/result&gt;
              &lt;result name="error"&gt;/AccessDenied.jsp&lt;/result&gt;
           &lt;/action&gt;
        &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  
  <p>The action mapping ---- I tried hello as action name and also hello.action as action name but got the same error</p>
  
  <p><strong>My web.xml file</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="http://java.sun.com/xml/ns/javaee" 
     xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
     http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
     id="WebApp_ID" version="3.0"&gt;
  
     &lt;display-name&gt;Struts 2&lt;/display-name&gt;
     &lt;welcome-file-list&gt;
        &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
     &lt;/welcome-file-list&gt;
     &lt;filter&gt;
        &lt;filter-name&gt;struts2&lt;/filter-name&gt;
        &lt;filter-class&gt;
           org.apache.struts2.dispatcher.FilterDispatcher
        &lt;/filter-class&gt;
     &lt;/filter&gt;
  
     &lt;filter-mapping&gt;
        &lt;filter-name&gt;struts2&lt;/filter-name&gt;
        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
     &lt;/filter-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Even after cleaning the project redeploying it and again restarting the server I was not able to remove the error.</p>