⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpservlet.java

📁 This a java example
💻 JAVA
字号:
package javax.servlet.http;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2002-4-13
 * Time: 23:42:20
 * To change this template use Options | File Templates.
 */
import javax.servlet.ServletException;
import java.io.*;
public class HttpServlet {
    public void service(HttpServletRequest req, HttpServletResponse res)
        throws ServletException, IOException{
        String method=req.getMethod();
        if(method.equals("GET")){
            doGet(req,res);
        }else{
            if(method.equals("POST")){
                doPost(req,res);
            }
        }
    }
    protected void doGet(HttpServletRequest req, HttpServletResponse resp)
        throws ServletException, IOException{

    }
    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
        throws ServletException, IOException{

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -