ch09_02.java

来自「learn to use eclipse by example」· Java 代码 · 共 43 行

JAVA
43
字号
/*
 * Created on Nov 24, 2003
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package org.eclipsebook.ch09;

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

/**
 * @author Steven Holzner
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */

public class Ch09_02 extends HttpServlet {
	public void doGet(HttpServletRequest request,
		HttpServletResponse response)
		throws IOException, ServletException
	{
		response.setContentType("text/html");
		PrintWriter out = response.getWriter();

		out.println("<HTML>");
		out.println("<HEAD>");
		out.println("<TITLE>");
		out.println("A Servlet Example");
		out.println("</TITLE>");
		out.println("</HEAD>");
		out.println("<BODY>");
		out.println("<H1>");
		out.println("Working With Servlets");
		out.println("</H1>");
		out.println("Using servlets");
		out.println("</BODY>");
		out.println("</HTML>");
	}
}

⌨️ 快捷键说明

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