在写代码的时候,总发现前端数据获取不到,最后发现了问题是因为get和post要一起出现,缺一不可。
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}