title: Struts2 - The requested resource is not available
body: <p>Somebody please help me to execute this very first Struts2 app. </p>
  
  <p>web.xml` file:</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;Struts2FirstProject&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.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>Struts.xml file:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
      &lt;struts&gt;
  
      &lt;package name="default" extends="struts-default"&gt;
          &lt;action name="getHello" class="anvi.Hello"&gt;
              &lt;result name="success"&gt;/success.jsp&lt;/result&gt;
              &lt;result name="fail"&gt;/error.jsp&lt;/result&gt;
          &lt;/action&gt;
      &lt;/package&gt;
  
      &lt;/struts&gt;
  </code></pre>
  
  <p>anvi.hello:</p>
  
  <pre><code>    package anvi;
  
      public class Hello {
      public String execute(){
          System.out.println("Hello from execute");
          return "success";
  
      }
      }
  </code></pre>
  
  <p>Console is:</p>
  
  <pre><code>    9 Nov, 2012 6:16:54 PM org.apache.catalina.core.AprLifecycleListener init
      INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Program Files\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.6.0_21\bin;C:\Eclipse\eclipse;;.
      9 Nov, 2012 6:16:55 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
      WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Struts2FirstProject' did not find a matching property.
      9 Nov, 2012 6:16:57 PM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["http-bio-8080"]
      9 Nov, 2012 6:16:57 PM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
      9 Nov, 2012 6:16:57 PM org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 4256 ms
      9 Nov, 2012 6:16:57 PM org.apache.catalina.core.StandardService startInternal
      INFO: Starting service Catalina
      9 Nov, 2012 6:16:57 PM org.apache.catalina.core.StandardEngine startInternal
      INFO: Starting Servlet Engine: Apache Tomcat/7.0.32
      9 Nov, 2012 6:17:02 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
      INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [224] milliseconds.
      9 Nov, 2012 6:17:04 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
      INFO: Parsing configuration file [struts-default.xml]
      9 Nov, 2012 6:17:05 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
      INFO: Unable to locate configuration files of the name struts-plugin.xml, skipping
      9 Nov, 2012 6:17:05 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
      INFO: Parsing configuration file [struts-plugin.xml]
      9 Nov, 2012 6:17:05 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
      SEVERE: Document is invalid: no grammar found. at (null:3:8)
      org.xml.sax.SAXParseException: Document is invalid: no grammar found.
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at javax.xml.parsers.SAXParser.parse(Unknown Source)
          at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:949)
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:163)
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:130)
          at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:209)
          at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
          at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
          at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
          at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
          at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
          at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
          at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
          at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
          at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:103)
          at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
      9 Nov, 2012 6:17:05 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
      SEVERE: Dispatcher initialization failed
      Unable to load configuration. - file:/D:/SOFTWARES/java/apache-tomcat-7.0.32/Struts2FirstProject/WEB-INF/classes/struts.xml:3:8
          at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
          at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
          at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
          at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
          at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
          at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
          at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
          at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
          at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:103)
          at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
      Caused by: Unable to load file:/D:/SOFTWARES/java/apache-tomcat-7.0.32/Struts2FirstProject/WEB-INF/classes/struts.xml - file:/D:/SOFTWARES/java/apache-tomcat-7.0.32/Struts2FirstProject/WEB-INF/classes/struts.xml:3:8
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:954)
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:163)
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:130)
          at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:209)
          at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
          ... 18 more
      Caused by: Document is invalid: no grammar found. - file:/D:/SOFTWARES/java/apache-tomcat-7.0.32/Struts2FirstProject/WEB-INF/classes/struts.xml:3:8
          at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:949)
          ... 22 more
      Caused by: org.xml.sax.SAXParseException: Document is invalid: no grammar found.
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at javax.xml.parsers.SAXParser.parse(Unknown Source)
          at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
          ... 23 more
      9 Nov, 2012 6:17:05 PM org.apache.catalina.core.StandardContext filterStart
      SEVERE: Exception starting filter struts2
      Unable to load configuration. - file:/D:/SOFTWARES/java/apache-tomcat-7.0.32/Struts2FirstProject/WEB-INF/classes/struts.xml:3:8
          at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:450)
          at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
          at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
          at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
          at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
          at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
          at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:103)
          at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
      Caused by: Unable to load configuration. - file:/D:/SOFTWARES/java/apache-tomcat-7.0.32/Struts2FirstProject/WEB-INF/classes/struts.xml:3:8
          at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
          at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
          at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
          ... 16 more
      Caused by: Unable to load file:/D:/SOFTWARES/java/apache-tomcat-7.0.32/Struts2FirstProject/WEB-INF/classes/struts.xml - file:/D:/SOFTWARES/java/apache-tomcat-7.0.32/Struts2FirstProject/WEB-INF/classes/struts.xml:3:8
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:954)
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:163)
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:130)
          at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:209)
          at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
          ... 18 more
      Caused by: Document is invalid: no grammar found. - file:/D:/SOFTWARES/java/apache-tomcat-7.0.32/Struts2FirstProject/WEB-INF/classes/struts.xml:3:8
          at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)
          at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:949)
          ... 22 more
      Caused by: org.xml.sax.SAXParseException: Document is invalid: no grammar found.
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at javax.xml.parsers.SAXParser.parse(Unknown Source)
          at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
          ... 23 more
      9 Nov, 2012 6:17:05 PM org.apache.catalina.core.StandardContext startInternal
      SEVERE: Error filterStart
      9 Nov, 2012 6:17:05 PM org.apache.catalina.core.StandardContext startInternal
      SEVERE: Context [/Struts2FirstProject] startup failed due to previous errors
      9 Nov, 2012 6:17:05 PM org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory D:\SOFTWARES\java\apache-tomcat-7.0.32\webapps\docs
      9 Nov, 2012 6:17:05 PM org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory D:\SOFTWARES\java\apache-tomcat-7.0.32\webapps\examples
      9 Nov, 2012 6:17:06 PM org.apache.catalina.core.ApplicationContext log
      INFO: ContextListener: contextInitialized()
      9 Nov, 2012 6:17:06 PM org.apache.catalina.core.ApplicationContext log
      INFO: SessionListener: contextInitialized()
      9 Nov, 2012 6:17:06 PM org.apache.catalina.core.ApplicationContext log
      INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@89dd')
      9 Nov, 2012 6:17:06 PM org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory D:\SOFTWARES\java\apache-tomcat-7.0.32\webapps\host-manager
      9 Nov, 2012 6:17:06 PM org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory D:\SOFTWARES\java\apache-tomcat-7.0.32\webapps\manager
      9 Nov, 2012 6:17:07 PM org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory D:\SOFTWARES\java\apache-tomcat-7.0.32\webapps\ROOT
      9 Nov, 2012 6:17:07 PM org.apache.coyote.AbstractProtocol start
      INFO: Starting ProtocolHandler ["http-bio-8080"]
      9 Nov, 2012 6:17:07 PM org.apache.coyote.AbstractProtocol start
      INFO: Starting ProtocolHandler ["ajp-bio-8009"]
      9 Nov, 2012 6:17:07 PM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 10008 ms
  </code></pre>
  
  <p>Image:
        <img src="https://i.stack.imgur.com/5TqU5.jpg" alt="image 1">
        <img src="https://i.stack.imgur.com/gT32k.jpg" alt="image 2">
        <img src="https://i.stack.imgur.com/19Iqo.jpg" alt="image 3"></p>