码迷,mamicode.com
首页 > 其他好文 > 详细

request实现页面包含

时间:2014-07-08 22:14:15      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   java   color   os   

bubuko.com,布布扣
 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 }
View Code

 

request实现页面包含,布布扣,bubuko.com

request实现页面包含

标签:style   blog   http   java   color   os   

原文地址:http://www.cnblogs.com/aineko/p/3830650.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!