title: Java Servlet 3.0 and @webservlet
body: <p>Trying to access a Servlet from a button on HTML page</p>
  
  <p>//Html Page</p>
  
  <pre><code>FORM method="GET" action="/StudentDBServlet"&gt; 
  </code></pre>
  
  <p>yada yada</p>
  
  <pre><code>INPUT type="submit" value="Register" name="Register"&gt;
  </code></pre>
  
  <p>//My Servlet</p>
  
  <pre><code>@WebServlet(name="StudentDBServlet", urlPatterns={"/StudentDBServlet"})
  public class StudentDBServlet extends HttpServlet {
  </code></pre>
  
  <p>The servlet is located in Package <code>com.zzz.studentregistration</code></p>
  
  <p>When I hit the "Register" Button this is the url create</p>
  
  <pre><code>http://localhost:8080/StudentDBServlet?FirstName
  </code></pre>
  
  <p>but it needs to be this to work properly</p>
  
  <pre><code>http://localhost:8080/com.zzz.studentregistration/StudentDBServlet?FirstName
  </code></pre>
  
  <p>How or where do I add the package name to the Servlet definition?
  I tried adding to various parts if @WebServlet but no luck ???</p>
  
  <p>Thanks</p>