首页  >  文章  >  数据库  >   jsp源码实例1(输出)_MySQL

 jsp源码实例1(输出)_MySQL

WBOY
WBOY原创
2016-06-01 14:07:54921浏览

  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 =
""-//W3C//DTD HTML 4.0 " +
"Transitional//EN\">\n";
out.println(docType +
"\n" +
"

Hello WWW\n" +
"\n" +
"

Hello WWW

\n" +
"");
}
}
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn