首页 > 学院 > 开发设计 > 正文

一个最简单的servlet

2019-11-18 15:19:08
字体:
来源:转载
供稿:网友

  ---摘自互联网

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

1. public class FirstServlet extends HttpServlet {

2. public void doGet(
3. HttpServletRequest request, HttpServletResponse response)
4. throws ServletException, IOException {

5. PRintWriter out = response.getWriter();
6. out.println("The First Servlet Worked !");
}
}

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表