关于servlet调用doGet或者doPost以后报405的问题

    xiaoxiao2021-03-25  90

    package com.sparkhuu.servlets; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ServletDemo3 extends HttpServlet { /** * */ private static final long serialVersionUID = 2L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // TODO Auto-generated method stub // super.doGet(req, resp); resp.getWriter().write("hello servlet"); System.out.println("********ServletDemo3*********"); } }

    只需要把调用的super注释掉即可 也可以关注我的公众号

    转载请注明原文地址: https://ju.6miu.com/read-11484.html

    最新回复(0)