码迷,mamicode.com
首页 > Web开发 > 详细

jsp如何包含一个servlet?请举一个例子?

时间:2019-03-18 19:53:19      阅读:338      评论:0      收藏:0      [点我收藏+]

标签:视频下载   OLE   class   index   throws   end   xtend   down   imp   

想要包含一个servlet得用下列的方法,it is alleged that include file="servlet1" can not work。(视频下载) (全部书籍)

例 4.4.2

<html>
<body>
    <jsp:include page="/Cookie/DeleteCookie" flush="true" />
</body>
</html>



package com;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class DeleteCookie extends HttpServlet {
    protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {

详情请见:http://www.mark-to-win.com/index.html?content=Jsp/jspUrl.html&chapter=Jsp/jsp3_web.html#HowJspIncludeServlet

jsp如何包含一个servlet?请举一个例子?

标签:视频下载   OLE   class   index   throws   end   xtend   down   imp   

原文地址:https://www.cnblogs.com/mark-to-win/p/10554325.html

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