title: error in retrieving mapping for action in struts1.2
body: <p>im stuck with this error n unable to find whr i went wrong</p>
  
  <p>here is code..plz go through it 
  im using myelipse,struts1.2</p>
  
  <p>struts-config.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts      Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"&gt;
  
  &lt;struts-config&gt;
  &lt;data-sources /&gt;
  &lt;form-beans /&gt;
  &lt;global-exceptions /&gt;
  &lt;global-forwards /&gt;
  &lt;action-mappings&gt;
          &lt;action path="/SwitchAction"  type="org.apache.struts.actions.SwitchAction"/&gt;
   &lt;/action-mappings&gt;
  &lt;message-resources parameter="com.yourcompany.struts.ApplicationResources" /&gt;
  &lt;/struts-config&gt;
  </code></pre>
  
  <p>struts-config-Admin.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"&gt;
  
     &lt;struts-config&gt;
      &lt;data-sources /&gt;
      &lt;form-beans&gt;
          &lt;form-bean name="adminLoginForm" type="Admin.Form.AdminLoginForm" /&gt;
          &lt;form-bean name="adminUserCreationForm" type="Admin.Form.AdminUserCreationForm" /&gt;
  
  
      &lt;/form-beans&gt;
  
      &lt;global-exceptions /&gt;
      &lt;global-forwards /&gt;
      &lt;action-mappings&gt;
          &lt;action attribute="AdminLoginForm" input="/AdminModule/AdminLogin.jsp"
              name="adminLoginForm" path="/AdminLogin" scope="request"
              type="Admin.Action.AdminLoginAction"&gt;
              &lt;set-property property="cancellable" value="true" /&gt;
              &lt;forward name="failure" path="/AdminErrorPage.jsp" /&gt;
              &lt;forward name="success" path="/AdminHomePage.jsp" /&gt;
          &lt;/action&gt;
          &lt;action attribute="adminUserCreationForm" input="/AdminModule/AdminUserCreation.jsp"
              name="adminUserCreationForm" path="/AdminUserCreation" scope="request"
              type="Admin.Action.AdminUserCreationAction"&gt;
              &lt;set-property property="cancellable" value="true" /&gt;
              &lt;forward name="failure" path="/AdminModule/AdminErrorPage.jsp" /&gt;
              &lt;forward name="success" path="/AdminModule/AdminSuccessPage.jsp" /&gt;
          &lt;/action&gt;
      &lt;/action-mappings&gt;
  &lt;/struts-config&gt;
  </code></pre>
  
  <p>AdminUserCreationAction.java</p>
  
  <pre><code>    &lt;%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%&gt;
  &lt;%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%&gt;
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;base href="&lt;%=basePath%&gt;"    
      &lt;/head&gt;
  
      &lt;body&gt;
          User Creation Page
          &lt;html:form action="/AdminUserCreation"&gt;
              AdminName : &lt;html:text property="username"/&gt;&lt;html:errors property="username"/&gt;&lt;br/&gt;
              Password : &lt;html:password property="password"/&gt;&lt;html:errors property="password"/&gt;&lt;br/&gt;
              &lt;html:submit/&gt;
          &lt;/html:form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>AdminUserCreationForm.java</p>
  
  <pre><code>package Admin.Form;
  
  import org.apache.struts.action.ActionForm;
  
  public class AdminUserCreationForm extends ActionForm {
  
      private String username;
      private String password;
      public String getUsername() {
          return username;
      }
      public void setUsername(String username) {
          this.username = username;
      }
      public String getPassword() {
          return password;
      }
      public void setPassword(String password) {
          this.password = password;
      }
  }
  </code></pre>
  
  <p>AdminUserCreation.jsp</p>
  
  <pre><code>    &lt;%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%&gt;
  &lt;%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%&gt; 
      &lt;/head&gt;
      &lt;body&gt;
          User Creation Page
          &lt;html:form action="/AdminUserCreation"&gt;
              AdminName : &lt;html:text property="username"/&gt;&lt;html:errors property="username"/&gt;&lt;br/&gt;
              Password : &lt;html:password property="password"/&gt;&lt;html:errors property="password"/&gt;&lt;br/&gt;
              &lt;html:submit/&gt;
          &lt;/html:form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>error im getting in browser</p>
  
  <pre><code> type Exception report
  
       message 
  
       description The server encountered an internal error () that prevented it from fulfilling this request.
  
       exception 
  
       org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /AdminUserCreation
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  
  
  root cause 
  
       javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /AdminUserCreation
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
      org.apache.jsp.AdminModule.AdminUserCreation_jsp._jspService(AdminUserCreation_jsp.java:114)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  
  
  root cause 
  
       javax.servlet.jsp.JspException: Cannot retrieve mapping for action /AdminUserCreation
      org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:759)
      org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)
      org.apache.jsp.AdminModule.AdminUserCreation_jsp._jspx_meth_html_005fform_005f0(AdminUserCreation_jsp.java:131)
      org.apache.jsp.AdminModule.AdminUserCreation_jsp._jspService(AdminUserCreation_jsp.java:104)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
           org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  
  
       note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.
  </code></pre>
  
  <p>msg im gettng in console</p>
  
  <pre><code> Servlet.service() for servlet jsp threw exception
   javax.servlet.jsp.JspException: Cannot retrieve mapping for action /AdminUserCreation
   at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:759)
      at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)
      at org.apache.jsp.AdminModule.AdminUserCreation_jsp._jspx_meth_html_005fform_005f0(AdminUserCreation_jsp.java:131)
      at org.apache.jsp.AdminModule.AdminUserCreation_jsp._jspService(AdminUserCreation_jsp.java:104)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)
  </code></pre>