title: struts :404 status The request resource not found
body: <p>i am writing my first struts example .i followed the exact steps but even then facing this problem,dont know whats wrong code was working on my teacher's machine but on mine not ,i think there is a small mistake i am doing plz help me to locate
  1) i have index.jsp</p>
  
  <pre><code>&lt;%@ taglib uri="/struts-tags" prefix="s" %&gt;
  &lt;s:form action="login"&gt;
  &lt;s:textfield name="username" label="username:"&gt;&lt;/s:textfield&gt;
  &lt;s:submit&gt;&lt;/s:submit&gt;
  &lt;/s:form&gt;
  </code></pre>
  
  <p>2) the bean package with Loginaction class(pogo class)</p>
  
  <pre><code>package bean;
  
  public class Loginaction {
      String username;
  
      public String getUsername() {
          return username;
      }
  
      public void setUsername(String username) {
          this.username = username;
      }
      public String execute()
      {
  
  
              return "success";
  
  
      }
  
  
  
  }
  </code></pre>
  
  <p>3) the struts.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE struts PUBLIC
     "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
     "http://struts.apache.org/dtds/struts-2.3.dtd"&gt;
  &lt;struts&gt;
  &lt;package name="demo" extends="struts-default"&gt;
  &lt;action name="login" class="bean.Loginaction"&gt;
  &lt;result name="success"&gt;welcome.jsp&lt;/result&gt;
  
  &lt;/action&gt;
  &lt;/package&gt;
  
  &lt;/struts&gt; 
  </code></pre>
  
  <p>4) the welcome.jsp</p>
  
  <pre><code>&lt;h1&gt;hi user.&lt;/h1&gt;
  </code></pre>
  
  <p>5) the web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;web-app id="WebApp_9" version="2.4"
      xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
  &lt;display-name&gt;struts1&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>6) and the directory structure </p>
  
  <p>both package and the struts.xml in the src folder and else in the web-inf (jsps and the web.xml)</p>
  
  <p>on the console i am getting``</p>
  
  <pre><code>Apr 4, 2013 12:54:26 AM org.apache.catalina.core.AprLifecycleListener init
  INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/tarun/MyEclipse Blue/binary/com.sun.java.jdk.linux.x86_64_1.6.0.u43/bin:/home/tarun/MyEclipse Blue/plugins/com.genuitec.eclipse.easie.tomcat.myeclipse_11.0.0.me201211151802/tomcat/bin
  Apr 4, 2013 12:54:26 AM org.apache.coyote.http11.Http11Protocol init
  SEVERE: Error initializing endpoint
  java.net.BindException: Address already in use:8080
      at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
      at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
      at org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
      at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
      at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
  Apr 4, 2013 12:54:26 AM org.apache.catalina.startup.Catalina load
  SEVERE: Catalina.start
  LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use:8080
      at org.apache.catalina.connector.Connector.initialize(Connector.java:1061)
      at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
      at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
  Apr 4, 2013 12:54:26 AM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 379 ms
  Apr 4, 2013 12:54:26 AM org.apache.catalina.core.StandardService start
  INFO: Starting service Catalina
  Apr 4, 2013 12:54:26 AM org.apache.catalina.core.StandardEngine start
  INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
  Apr 4, 2013 12:54:27 AM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
  INFO: Parsing configuration file [struts-default.xml]
  Apr 4, 2013 12:54:27 AM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
  INFO: Parsing configuration file [struts-plugin.xml]
  Apr 4, 2013 12:54:29 AM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
  INFO: Parsing configuration file [struts.xml]
  Apr 4, 2013 12:54:29 AM org.apache.coyote.http11.Http11Protocol start
  SEVERE: Error starting endpoint
  java.net.BindException: Address already in use:8080
      at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
      at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:515)
      at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:204)
      at org.apache.catalina.connector.Connector.start(Connector.java:1132)
      at org.apache.catalina.core.StandardService.start(StandardService.java:531)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
  Apr 4, 2013 12:54:29 AM org.apache.catalina.startup.Catalina start
  SEVERE: Catalina.start: 
  LifecycleException:  service.getName(): "Catalina";  Protocol handler start failed: java.net.BindException: Address already in use:8080
      at org.apache.catalina.connector.Connector.start(Connector.java:1139)
      at org.apache.catalina.core.StandardService.start(StandardService.java:531)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
  Apr 4, 2013 12:54:29 AM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 3506 ms
  Apr 4, 2013 12:54:29 AM org.apache.catalina.core.StandardServer await
  SEVERE: StandardServer.await: create[8005]: 
  java.net.BindException: Address already in use
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
      at java.net.ServerSocket.bind(ServerSocket.java:328)
      at java.net.ServerSocket.&lt;init&gt;(ServerSocket.java:194)
      at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
      at org.apache.catalina.startup.Catalina.await(Catalina.java:630)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:590)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
  Apr 4, 2013 12:54:29 AM org.apache.coyote.http11.Http11Protocol pause
  INFO: Pausing Coyote HTTP/1.1 on http-8080`enter code here`
  Apr 4, 2013 12:54:29 AM org.apache.catalina.connector.Connector pause
  SEVERE: Protocol handler pause failed
  java.lang.NullPointerException
      at org.apache.jk.server.JkMain.pause(JkMain.java:679)
      at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)
      at org.apache.catalina.connector.Connector.pause(Connector.java:1074)
      at org.apache.catalina.core.StandardService.stop(StandardService.java:563)
      at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
      at org.apache.catalina.startup.Catalina.stop(Catalina.java:616)
      at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:659)
  </code></pre>