Posted on 2007-10-27 17:25
oahiq.Max 閱讀(217)
評論(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造成的一些未知后果。