当前位置:Gxlcms > mysql > jsp源码实例1(输出)_MySQL

jsp源码实例1(输出)_MySQL

时间:2021-07-01 10:21:17 帮助过:6人阅读

  package coreservlets;

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

/** Simple servlet that generates HTML.
*


* Taken from Core Servlets and JavaServer Pages
* from Prentice Hall and Sun Microsystems Press,
* http://www.coreservlets.com/.
* © 2000 Marty Hall; may be freely used or adapted.
*/

public class HelloWWW2 extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String docType =
""Transitional//EN\">\n";
out.println(docType +
"\n" +
"Hello WWW\n" +
"\n" +
"

Hello WWW

\n" +
"");
}
}

人气教程排行