问题描述
- jsp向servlet提交数据报错
-
jsp向servlet提交数据报错如上图,我的程序如下,我觉得并没有限制doPost的使用啊,为什么会出现这个错误呢?
public class userServlet extends HttpServlet {
PreparedStatement st=null;
ResultSet rs=null;
Connection conn=null;private static final String sql_in = null; private static final long serialVersionUID = 1L; public void destroy() {} protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doPost(request, response); } public void doPost(HttpServletRequest request, HttpServletResponse response, HttpSession session) throws ServletException, IOExcepton {
解决方案
你的doPost(HttpServletRequest request, HttpServletResponse response, HttpSession session) 有3个参数, this.doPost(request, response);却只有两个参数
解决方案二:
你看看doPost方法是否在servlet中.
解决方案三:
当然在,图中最下面那个不就是吗
时间: 2024-09-20 16:15:39