这是我的index.html
这是我的web.xml
`
submitForm
student.StudentSurveyFormSubmit
submitForm
/submitForm
`
还有我的servlet类
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("
" + "Hi, "+request.getParameter("firstName") +" I am here" + "
"); }}每当我部署war文件并单击sumbot按钮时,我会得到一个异常:
服务器遇到内部错误(),导致无法完成此请求 .
例外
javax.servlet.ServletException:实例化servlet类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)
我哪里错了?