struts in action读书笔记

来源:互联网 发布:linux就该这么学pdf 编辑:程序博客网 时间:2024/04/30 22:46
 
Struts in action 学习笔记
一.Struts的控制流
因为web 应用是动态的,所以很难表现“一个真正固定的控制流”。取决于环境,不同的方式下有很多不同的事情发生—特别是在web 应用中。但是事情仍然有一个通用的秩序。如果你是个Struts,应用框架,甚至web 应用的新手,这些流程刚开始可能难以跟得上(理解)。亟待解决的各种问题不一定那么明显。我们将在本书中慢慢详细涉及。首先,在介绍树木之前我们先认识这片森林。你读完此书后,我们建议你再次回来,看看每一部分是如何切合进这个总图的。
1.1总图

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --><configuration>    <system.web>        <customErrors mode="Off"/>    </system.web></configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --><configuration>    <system.web>        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>    </system.web></configuration>

'>1

 

1-1 Struts 请求-相应流程
以UML以次序图的方式展示了Struts 请求-响应流程。我们来按这个请求-响应流
程走一遍。 括号内的数字请参照图11中的相关地方:
原创粉丝点击