首页 > 编程语言 > 详细

javaee学习-新建servlet 直接返回html

时间:2016-07-01 20:12:09      阅读:115      评论:0      收藏:0      [点我收藏+]
 1 protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
 2              //1.直接返回html页面
 4                 response.setContentType("text/html");
 5                 PrintWriter out = response.getWriter();
 6                 out.print(this.getClass());
 7                 out.println("</HTML>");
 8                 out.flush();
 9                 out.close();
10 }

 

javaee学习-新建servlet 直接返回html

原文:http://www.cnblogs.com/xianghu/p/5634092.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!