1.java.lang.IllegalArgumentException: 名为 [UserInfoUpdateByIdServlet]和 [com.study.servlet.UserInfoUpdateByIdServlet] 的servlet不能映射为一个url模式(url-pattern) [/UserInfoUpdateByIdServlet]
原因:在web.xml中配置了<servlet>,同时还在该servlet上又用了@WebServlet。
解决办法:删掉web.xml中对应的配置,或者删掉servlet上的@WebServlet
2.java.sql.SQLException: Field 'id' doesn't have a default value
原因:自己的MySQL数据库建表的时候没有给主键id设置自动增长。
解决办法:在数据库中设置id为int类型,并设置主键id自动增长
3.Data too long for column 'user_type' at row 1
原因:表的user_type数据类型设置的太短,设置的char,长度为1
解决办法:修改(数据类型为varchar)长度为20