学习web。错误总结:
1.有时候,重新加入tomcat运行环境,可以解决问题
2.表单提交不能使用doget或dopost,看看是否加了servlet()这个方法
加了,加了就,可以去掉,因为我测试了是去调用了servlet()里面的方法。
3.有一个jar包很重要。因为要使用servlet包中的类:如下加入如下
1.Multiple annotations found at this line:
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java
Build Path0
***导入servlet.jar,在tomcat中lib中(jar库)