title: Error instantiating servlet class
body: <p>This is my index.html</p>
  
  <p><code>&lt;form action="submitForm" method="get"&gt;
      &lt;input type="submit" name="Submit" value="submit" onclick="" /&gt;
      &lt;/form&gt;</code></p>
  
  <p>This is my web.xml</p>
  
  <pre><code>`&lt;servlet&gt;
  &lt;servlet-name&gt;submitForm&lt;/servlet-name&gt;
  &lt;servlet-class&gt;student.StudentSurveyFormSubmit&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;submitForm&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/submitForm&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;`
  </code></pre>
  
  <p>And my servlet class</p>
  
  <p><code>package student;
   @WebServlet("/StudentSurveyFormSubmit")
      public class StudentSurveyFormSubmit extends HttpServlet {
      protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
      response.setContentType("text/html");
      PrintWriter out = response.getWriter();
      out.println("&lt;h1&gt;" + "Hi, "+request.getParameter("firstName") +"  I am here" + "&lt;/h1&gt;");
      }}</code></p>
  
  <p>Whenever I deploy my war file and click sumbot button I get an exception as : </p>
  
  <p>The server encountered an internal error () that prevented it from fulfilling this request.</p>
  
  <p>exception</p>
  
  <p>javax.servlet.ServletException: Error instantiating servlet class student.StudentSurveyFormSubmit
      org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
      java.lang.Thread.run(Unknown Source)</p>
  
  <p>Where am I going wrong?</p>