性能优势 ?Run in the same context as application server ?执行并且驻留在内存中 ?有请求时提前被装入或装入 ?通过HTTP请求维持对话 ?减轻后置系统的负担 ?多线程 ?可伸缩于多处理器以及多机种系统(IBM WebSphere Performance Pack)
public class MyServlet extends HttpServlet { public void doGet( HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { // get stream to output HTML on! res. setContentType(" text/ html"); PrintWriter out = res. getWriter();