</pre><p></p><p><pre name="code" class="java">package com.king;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
public class MyServlet extends HttpServlet {
//Get请求
public void doGet(HttpServletRequest req, HttpServletResponse resp) {
System.out.println("MyServlet doGet -------");
}
// Post请求
public void doPost(HttpServletRequest req, HttpServletResponse resp) {doGet(req, resp);}}
servlet开发4-HttpServlet
最新推荐文章于 2022-08-07 15:20:38 发布