标签:style blog http java color os
1 package cn.itcast.request; 2 3 import java.io.IOException; 4 5 import javax.servlet.ServletException; 6 import javax.servlet.http.HttpServlet; 7 import javax.servlet.http.HttpServletRequest; 8 import javax.servlet.http.HttpServletResponse; 9 10 11 import cn.itcast.User; 12 13 //用include实现页面包含 14 public class RequestDemo extends HttpServlet { 15 16 public void doGet(HttpServletRequest request, HttpServletResponse response) 17 throws ServletException, IOException { 18 19 request.getRequestDispatcher("/MyJsp.jsp").include(request, response); 20 response.getWriter().write("heihei!"); 21 } 22 23 public void doPost(HttpServletRequest request, HttpServletResponse response) 24 throws ServletException, IOException { 25 26 } 27 28 }
标签:style blog http java color os
原文地址:http://www.cnblogs.com/aineko/p/3830650.html