现在的位置: 首页 > 综合 > 正文

jsp源码实例1(输出)

2013年08月02日 ⁄ 综合 ⁄ 共 623字 ⁄ 字号 评论关闭

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"> ";
out.println(docType +
" " +


"" +
" " +
"

Hello WWW

" +
"");

}
}
来自:http://www.javah.net/JSP_JSF/20070516/1405.html

抱歉!评论已关闭.