WEB开发网
开发学院WEB开发Jsp 一个最简单的servlet 阅读

一个最简单的servlet

 2008-01-05 08:37:10 来源:WEB开发网   
核心提示:---摘自互联网import java.io.*;import javax.servlet.*;import javax.servlet.http.*;1. public class FirstServlet extends HttpServlet {2. public void doGet(3. HttpServle

  ---摘自互联网

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 !");
}
}

Tags:一个 简单 servlet

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接