随想 201800609

WebApplication:

 

1.  Browser UI: ajax request, http request, location, document, window, js, DOM tree

2.  Servlet Container:  

2.1 accept http request

2.2 wrappe to HttpServletRequest and back to client with HttpServletResponse

2.3 find the proper servlet to handle the request and back to user with reponse

2.4 filter is able to make changes on request or redirect to other server, for pre-process for request

2.4.1 

Filter有如下几个用处。

 

    • 在HttpServletRequest到达Servlet之前,拦截客户的HttpServletRequest。
    • 根据需要检查HttpServletRequest,也可以修改HttpServletRequest头和数据。
    • 在HttpServletResponse到达客户端之前,拦截HttpServletResponse。
    • 根据需要检查HttpServletResponse,也可以修改HttpServletResponse头和数据。
    • 多个匹配的Filter,是按照其在web.xml中配置的顺序来执行的

 

Filter有如下几个种类。

 

    • 用户授权的Filter:Filter负责检查用户请求,根据请求过滤用户非法请求。
    • 日志Filter:详细记录某些特殊的用户请求。
    • 负责解码的Filter:包括对非标准编码的请求解码。
    • 能改变XML内容的XSLT Filter等。
    • Filter可负责拦截多个请求或响应;一个请求或响应也可被多个请求拦截。

 

 

2.3 URL mapping

2.4. View

2.4.1 View name

2.4.2 View Template

2.4..3 View Resolver

2.4.4 View controller

2.4.5 View Router

2.5 Interception

2.6 Filter

2.7 URL mapping Handler -->Controller

 

下图中 BaseInterceptor::preHandler & TestInterceptor::preHandler 应该在DispatcherServlet 之后

 

 

https://www.cnblogs.com/doit8791/p/4209442.html

https://blog.csdn.net/king_is_everyone/article/details/53116744

转载于:https://www.cnblogs.com/iiiDragon/p/9159743.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值