title: 404 on GET request to Servlet
body: <p>I have been trying for 3 days now to create a Java EE project, that uses JSP, Servlet and EJB in a single project, as I need to do a course final assignment on this.</p>
  
  <p>We were instructed to use JBOSS 4.2.3, and so that is what I try to use.</p>
  
  <p>I set up my environment as follows:</p>
  
  <ol>
  <li><a href="http://community.linuxmint.com/tutorial/view/1372" rel="nofollow">http://community.linuxmint.com/tutorial/view/1372</a></li>
  <li>Install IntelliJ Idea 13 Ultimate.</li>
  <li>Download JBOSS and prepare a directory to use.</li>
  <li>After those 3 days of hard work, I managed to get a sample app, created by this tutorial:
  <a href="http://wiki.jetbrains.net/intellij/Developing_and_running_a_Java_EE_Hello_World_application#The_Hello_World_Java_EE_application" rel="nofollow">http://wiki.jetbrains.net/intellij/Developing_and_running_a_Java_EE_Hello_World_application#The_Hello_World_Java_EE_application</a></li>
  </ol>
  
  <p>Now, the application compiles, I get the index.jsp on: <code>http://localhost:8080/webWeb/</code></p>
  
  <p>However, I get a 404 error if I click it, and submit to <code>http://localhost:8080/webWeb/helloworld</code></p>
  
  <p>I dont know what else to try, I think I Googled and read pretty much everything :(
  Here is a link to the Project archive, so that you could (potentially) test out my project, see if you can solve this problem somehow...</p>
  
  <p><a href="https://www.dropbox.com/sh/9sma5vh7usy2h3p/AADA64KPyLH29iGz8OamWyNna" rel="nofollow">https://www.dropbox.com/sh/9sma5vh7usy2h3p/AADA64KPyLH29iGz8OamWyNna</a></p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>UPDATE:
  For convenience, my HelloWorldServlet.java code:</p>
  
  <pre><code>package myservlets;
  
  import mybeans.HelloWorldBean;
  
  import javax.ejb.EJB;
  import java.io.IOException;
  
  @javax.servlet.annotation.WebServlet(name = "HelloWorldServlet", urlPatterns = "/helloworld")
  public class HelloWorldServlet extends javax.servlet.http.HttpServlet {
      @EJB
      private HelloWorldBean helloWorldBean;
      protected void doPost(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException, IOException {
  
      }
      @Override
      protected void doGet(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException, IOException {
          String hello=helloWorldBean.sayHello();
          request.setAttribute("hello",hello);
          request.getRequestDispatcher("hello.jsp").forward(request,response);
      }
  }
  </code></pre>
  
  <hr>
  
  <p>I feel I really must add, that this extreme difficulty of setting up Java to just work and allow me to focus on <strong>CODING</strong>, is the reason I prefer something like PHP, which just works for example... Am I wrong?</p>