文章插图
文章插图
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.
*/
【jsp源码输出实例】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 WWWn"
"n"
"Hello WWWn"
"");
}
}
推荐阅读
- 帮助青蛙过河 微信脑力大乱斗第45关图文玩法攻略
- 槐花甜饼的做法
- 个人评价怎么写简短
- 哪个是我闺女 微信脑力大乱斗第44关答案
- 冬天里长绿叶和开花的有哪些
- 我要换衣服了别让任何人看见 微信脑力大乱斗第43关答案
- 钉钉怎么申请加班?钉钉申请加班流程
- 女神要洗澡了,你该做什么_微信脑力大乱斗第42关通关攻略
- 苹果断流是什么意思