Servelt初体验
生命周期方法
构造器
init()方法
service()方法
destroy()方法
执行过程
第一次请求
创建对象
执行init()方法
执行service()方法
后面请求
执行service()方法
….
……
对象销毁前
执行destroy()方法
编写完LoginServlet并编写完xml文件后运行测试报错
最后发现是url处少加了/所以报错
在登录localhost:8080时报错
解决问题是发现selver locations处默认选择了第一个use workspace metadata 应该选择第二个use tomcat installation 并解决问题