posts - 12, comments - 6, trackbacks - 0, articles - 0
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

Struts学习笔记(1)----概念Overview

Posted on 2007-10-27 17:25 oahiq.Max 阅读(201) 评论(0)  编辑  收藏 所属分类: Java

       Struts applications are hosted by a web container and can make use of services provided
by the container, like handling requests via the HTTP and HTTPS protocol. This frees
developers up to focus on building applications that solve a business problem.

1、什么是Container?
    In general, containers provide a hosting environment for software components to run in.When using the services provided by a container, component developers may have to give up some control of the environment to the container, in trade for important services that the developers don’t have to worry about building.
2、Redirect和Forward之间的区别
    A.Redirect等于客户端向服务器发出两次request,同时也接受到两次response
      
       Forward却只是一次request一次response
         
       相比之下,Forward性能更高。
    B.Forward能够存储requestScope的Att而Redirect却不行。
    C.Forward的同时URL并不会变。
    D.Forward需要在Servlet中需要通过一个Dispatcher来实现。
    E.Redirect能够防止某些情况下客户端Refresh造成的一些未知后果。


只有注册用户登录后才能发表评论。


网站导航: