title: There is no Action mapped for namespace [/] and action name [LoginClass] associated with context path [/Struts2Application]. - [unknown location]
body: <p>Why i am getting this error in my First struts2 application</p>
  
  <p>Home.jsp :</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=UTF-8"
      pageEncoding="UTF-8"%&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;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form action="LoginClass" method="post"&gt;
  &lt;table&gt;
  &lt;tr&gt;
  &lt;td&gt;User Name :&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="Uname"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Password :&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="Pwd"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;input type="submit" value="Login"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Struts.xml :</p>
  
  <pre><code>&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;package name="Default" extends="Struts_default"&gt;
     &lt;action name="LoginClass" class="com.struts2.LoginCheckingClass" method="execute"&gt;
     &lt;result name="success"&gt;/LoginSuccessPage.jsp&lt;/result&gt;
     &lt;result name="Notsuccess"&gt;/Home.jsp&lt;/result&gt;   
     &lt;/action&gt;   
     &lt;/package&gt;   
     &lt;/struts&gt;
  </code></pre>
  
  <p>LoginCheckingClass.java :</p>
  
  <pre><code>   package com.struts2;
  
  public class LoginCheckingClass {
  
  
      private String name;
  
         public String execute() throws Exception {
            return "success";
         }
  
         public String getName() {
            return name;
         }
  
         public void setName(String name) {
            this.name = name;
         }
  
  }
  </code></pre>
  
  <p>Web.xml :</p>
  
  <pre><code>&lt;web-app xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
   version="2.5"&gt;
    &lt;display-name&gt;Struts2Application&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;home.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.ng.filter.StrutsPrepareAndExecuteFilter
    &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>This problem raised for me in earlier date so i fixed by this <a href="https://stackoverflow.com/questions/27664864/struts2there-is-no-action-mapped-for-namespace-and-action-name-hello-asso">Struts2:There is no Action mapped for namespace [/] and action name [hello] associated with context path [/struts2App1]</a> but now could not fix this.</p>
  
  <p>Someone tell me where i am doing mistake?</p>