servlet和jsp 三
发布日期:2021-11-15 14:57:26 浏览次数:32 分类:技术文章

本文共 1200 字,大约阅读时间需要 4 分钟。

一。标签文件

          【

                  (1).tag file指令

                            【

                                  1.tag指令<% tag (attribute="value") * %>{类似于jsp中的page}

                                   2.include指令<%@ include file="include.html">

                                   3.taglib指令<%@ taglib ur="" prefix=""%>

                                    4.attribute指令<%@  attribute (attribute="value") * %>

                                    4.variable指令<%@   variable  (attribute="value") * %>

                                   5..doBody<jsp:doBody var="' scop=“”“/>

                                   6.invoke  <jsp:invoke fragment=""/>

                                   】

                    】

二。监听器

                 【

                       (1).servlet Context监听器

                                       【

                                                 1.ServletContextListener{contextInitialized(),contextDestroyed()}

                                                 2.ServletContextAttributeListener{attibuteAdded,attributeRemoved,attributeReplaced}

                                                 】

                          (2)Seesion   Listeners监听器

                                        【

                                               1.HttpSessionListener{sessionCreated,sessionDestroyed         }

                                               2.HttpSessionAttributeListener{

{attibuteAdded,attributeRemoved,attributeReplaced}

                                               3.HttpSessionActivationListener{sessionDidActivate sessioWillPassivate}

                                                4.HttpSessionBindingListener{valueBound,valueUnbound}

                                              】

                            (3)ServletRequest Listener

                                        【

                                              1.ServletRequestListetner{requestInitialized,requestDestroyed}

                                               2.ServletRequestArttibuteListener{

{attibuteAdded,attributeRemoved,attributeReplaced}

                                         】

                            】

三。Filter

    (1)Filter        

            【  1.init

                 2.doFilter

                  3.destroy

                       】

      (2)Filter配置

             【

                   1.WebFilter

                   2.部署描述符

              】

         (3)eg:【

                             1.日志Filter

                              2.图像文件保护Filter

                               3.下载计数Filter

                           】

          (4)Filer顺序

四。修饰Requests及Responses

            (1)Decorator模式

              (2)servlet封装类

转载地址:https://blog.csdn.net/qq_39736176/article/details/81200743 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:servlet 和 jsp 基础四
下一篇:servlet和jsp 基础二

发表评论

最新留言

初次前来,多多关照!
[***.217.46.12]2024年03月30日 18时44分46秒