jsp源码实例1(输出)_JSP编程

package coreservlets;

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

/** Simple servlet that generates HTML.
* <P>
* 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 =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
"Transitional//EN\">\n";
out.println(docType +
"<HTML>\n" +
"<HEAD><TITLE>Hello WWW</TITLE></HEAD>\n" +
"<BODY>\n" +
"<H1>Hello WWW</H1>\n" +
"</BODY></HTML>");
}
}

时间: 2024-09-21 11:18:45

jsp源码实例1(输出)_JSP编程的相关文章

jsp源码实例3(获取jsp各种参数)_JSP编程

package coreservlets; import java.io.*;import javax.servlet.*;import javax.servlet.http.*;import java.util.*; /** Creates a table showing the current value of each* of the standard CGI variables.* <P>* Taken from Core Servlets and JavaServer Pages*

jsp源码实例5(cookie)_JSP编程

package coreservlets; import java.io.*;import javax.servlet.*;import javax.servlet.http.*; /** Sets six cookies: three that apply only to the current* session (regardless of how long that session lasts)* and three that persist for an hour (regardless

jsp源码实例1(输出)

js package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Simple servlet that generates HTML. * <P> * Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://w

jsp源码实例5(cookie)

cookie|js package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Sets six cookies: three that apply only to the current * session (regardless of how long that session lasts) * and three that persist for an ho

jsp源码实例4(搜索引擎)

js|搜索引擎 package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.net.*; public class SearchEngines extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throw

jsp源码实例2(获取表单参数)

js package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; /** Shows all the parameters sent to the servlet via either * GET or POST. Specially marks parameters that have * no values or multipl

jsp源码实例3(获取jsp各种参数)

js package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; /** Creates a table showing the current value of each * of the standard CGI variables. * <P> * Taken from Core Servlets and JavaServe

jsp源码实例

js package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.net.*; public class SearchEngines extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws Ser

JSP多种web应用服务器导致JSP源码泄漏漏洞_JSP编程

JSP多种web应用服务器导致JSP源码泄漏漏洞 作者:中联绿盟 汉化:不详 整理:JSPER 受影响的系统: BEA Systems Weblogic 4.5.1 - Microsoft Windows NT 4.0 BEA Systems Weblogic 4.0.4 - Microsoft Windows NT 4.0 BEA Systems Weblogic 3.1.8 - Microsoft Windows NT 4.0 IBM Websphere Application Server