- 浏览: 740966 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (419)
- 杂软粉墨 (2)
- 创意灵感 (3)
- 经验记录 (137)
- 开源轨迹 (2)
- sip-communicator (2)
- 闲侃杂谈 (8)
- 问题交流 (24)
- 概念模式 (32)
- 难点备案 (5)
- JwChat (1)
- 中国象棋 (1)
- 教育探索 (6)
- 英语研究 (58)
- 星际争霸 (1)
- 电信知识 (1)
- 软件架构 (3)
- 哲学探索 (26)
- 算法灵魂 (8)
- 近视探索 (6)
- 数学数学 (3)
- 牛角钻尖 (23)
- 至强文言 (3)
- 数据结构 (1)
- 宇宙物理 (2)
- 网络架构 (3)
- 游戏领域 (4)
- 图形处理 (2)
- 修炼之路 (8)
- 读书天地 (20)
- 编解乱码 (2)
- 概念探索 (8)
- 格物致知 (1)
- 其它语言 (1)
- 测试领域 (3)
- 文化风流 (1)
- JQuery (1)
- 網頁領域 (1)
- Unix/Linux (1)
- Inside JVM (1)
- 异常分析 (1)
最新评论
-
suyujie:
引用
HTML <a> 标签灰显禁用 -
suyujie:
HTML <a> 标签灰显禁用 -
suyujie:
HTML <a> 标签灰显禁用 -
suyujie:
HTML <a> 标签灰显禁用 -
iamzhoug37:
您能说一下"局部变量不受文本顺序限制" 是 ...
声明前为什么能赋值却不能输出,都是使用
Struts is a flexible control layer based on standard technologies like Java Filters, JavaBeans, ResourceBundles, Locales, and XML, as well as various OpenSymphony packages, like OGNL and XWork.
For the Model, the framework can interact with standard data access technologies, like JDBC and EJB , as well as most any third-party packages, like Cayenne , Hibernate , or iBATIS .
For the View, the framework works well with JavaServer Pages , including JSTL and JSF, as well as FreeMarker or Velocity Templates, PDF, XSLT, and other presentation systems.
Aside from actions and results, we can specify exception handlers and interceptors .
- Exception handlers declare how to handle an exception on a global or local basis. Instead of sprinking source code with try .. catch blocks, we can let the framework catch the exception and display the page of our choice. The page can display an appropriate message and details from the exception.
- Interceptors specify the "request-processing lifecycle" for an action. (What happens to the request before and after the Action class fires.) We can specify both global and local lifecycles. If some actions respond to AJAX, SOAP, or JSF requests, we can simplify the lifecycle, and even just "pass through" the request, if needed. However, these are special cases, and most applications can use the default interceptor stack, "out of the box".
The diagram describes the framework's architecture.
In the diagram, an initial request goes to the Servlet container (such as Jetty or Resin) which is passed through a standard filter chain. The chain includes the (optional) ActionContextCleanUp filter, which is useful when integrating technologies such as SiteMesh Plugin . Next, the required FilterDispatcher is called, which in turn consults the ActionMapper to determine if the request should invoke an action.
If the ActionMapper determines that an Action should be invoked, the FilterDispatcher delegates control to the ActionProxy . The ActionProxy consults the framework Configuration Files manager (initialized from the struts.xml file). Next, the ActionProxy creates an ActionInvocation , which is responsible for the command pattern implementation. This includes invoking any Interceptors (the before clause) in advance of invoking the Action itself.
Once the Action returns, the ActionInvocation is responsible for looking up the proper result associated with the Action result code mapped in struts.xml . The result is then executed, which often (but not always, as is the case for Action Chaining ) involves a template written in JSP or FreeMarker to be rendered. While rendering, the templates can use the Struts Tags provided by the framework. Some of those components will work with the ActionMapper to render proper URLs for additional requests.
All objects in this architecture (Actions, Results , Interceptors , and so forth) are created by an ObjectFactory . This ObjectFactory is pluggable. We can provide our own ObjectFactory for any reason that requires knowing when objects in the framework are created. A popular ObjectFactory implementation uses Spring as provided by the Spring Plugin . |
Interceptors are executed again (in reverse order, calling the after clause). Finally, the response returns through the filters configured in the web.xml . If the ActionContextCleanUp filter is present, the FilterDispatcher will not clean up the ThreadLocal ActionContext . If the ActionContextCleanUp filter is not present, the FilterDispatcher will cleanup all ThreadLocals.
发表评论
-
java语言中classes分类
2012-10-22 13:09 1612local class的scope是local,所以在方法 ... -
URL definition
2012-08-14 08:29 7267http://reg.163.com/login.jsp?ty ... -
how to defend against serialization and reflection attack for eager singleton
2012-08-08 09:18 1284//为什么要定义构造方法 因为不定义它也会有默认构造方法,而 ... -
Finalizer Guardian Idiom
2012-05-30 11:55 1302Effective Java 2nd 中Item 7: A ... -
我對多態的理解
2012-05-24 09:03 1057多态(polymorphism)是以一种看待事物更细致的角度来 ... -
Bridge Pattern
2011-06-17 11:59 819Intent Decouple an abstracti ... -
Composite Pattern
2011-06-17 09:12 954http://userpages.umbc.edu/~ta ... -
Observer Pattern
2011-06-15 11:32 1079consistent communication model ... -
Factory Method
2011-05-27 23:46 987how does the factory method pat ... -
Law of Demeter
2011-04-07 09:23 1044http://en.wikipedia.org/wiki/La ... -
Several thread-safe singleton collection
2011-02-24 10:19 10251. static inner class publi ... -
关于Arrays.sort()方法用到的设计模式
2011-02-18 09:12 2878/** * Src is the sour ... -
何时使用LSP
2011-01-24 09:12 1009当使用subclass无法满足LSP(Liskov Subst ... -
Command模式图详解
2011-01-12 16:53 961上图是command模式结构图,各个符号重点应该理解,符 ... -
IOC inversion体现在什么地方
2011-01-12 16:02 1060http://martinfowler.com/bliki/I ... -
什么时候需要synchronized
2010-12-02 15:32 1162当需要在某个方法上加synchronized关 ... -
多任务同时执行完毕后方执行后续任务
2010-12-02 10:20 1211多线程同时启动,执行完毕后启动新任务 1.传统join ... -
开闭原则
2010-03-15 13:58 961Closed for Modification; Op ... -
多态之RTTI
2010-01-21 16:58 1391所谓RTTI,是Runtime Type Informatio ... -
26 Hints for Agile Software Development
2009-11-23 16:14 100426 Hints for Agile Software Dev ...
相关推荐
8. **Plug-in Architecture(插件架构)**:Struts2的插件机制允许开发者扩展其功能,如Struts2-dojo-plugin提供了与Dojo库的集成,Struts2-json-plugin支持JSON响应等。 在"struts2_core_JAR开发包"中,包含了...
5. **插件架构(Plugin Architecture)**:Struts2支持插件扩展,可以方便地添加新的功能或集成其他框架。 6. **强大的表单和验证机制**:Struts2提供了一套完整的表单处理和验证机制,通过注解或者XML配置即可实现...
3. **Dependency Libraries**:Struts2依赖于其他开源库,如Apache Commons Lang、Ognl(Object-Graph Navigation Language)、Freemarker模板引擎等,这些库的JAR文件也需要一并下载。 4. **Struts2的文档**:通常...
Struts2是Apache软件基金会的开源项目,它是Struts1的升级版,提供更强大的功能和更好的性能。Struts2的核心是Action类,它接收HTTP请求并调用业务逻辑,然后将结果传递给视图进行展示。Struts2通过Interceptor...
6. **Plug-in Architecture**:Struts2支持插件架构,允许开发者扩展框架功能,比如添加新的拦截器、结果类型等。 7. **Freemarker and JSP**:Struts2支持使用Freemarker和JSP作为视图技术,Freemarker提供了更...
标题中的“xfire+struts2的资源包”指的是一个包含xfire和Struts2框架相关组件的集合,这些组件通常用于构建Java Web应用程序。Xfire是一个基于Java的SOAP服务框架,而Struts2是一个流行的MVC(模型-视图-控制器)...
Struts2是一个非常著名的Java Web开发框架,由Apache软件基金会维护。这个压缩包"struts2_3000_BBS2009_02.rar"可能包含了Struts2框架的一个实例,可能是BBS(论坛)应用的源代码,版本号可能是2009年的第二个迭代。...
3. **插件架构(Plugin Architecture)**:Struts2支持丰富的插件,如Freemarker和JSP视图技术,以及各种国际化和主题的支持。这使得开发者可以根据需求选择不同的技术栈,增强应用的功能。 4. **动态方法调用...
4. **插件架构(Plugin Architecture)**:Struts2允许扩展其核心功能,通过插件实现。例如,开发者可以使用Tiles插件来管理页面布局,或者使用Freemarker或Velocity作为视图技术。 5. **模型-视图-控制器(MVC)**...
10. **Plugin Architecture**:Struts2的插件架构使得扩展和集成其他技术变得简单,如Spring、Hibernate等。 Struts2.3.1.1 版本可能包含以下更新和改进: - 性能优化:提高框架处理请求的速度。 - 安全修复:修复...
它最初是为Apache Struts2项目开发的核心组件之一,但后来发展成为一个独立的框架。XWork的核心功能包括:处理用户请求、执行业务逻辑、数据转换以及验证等。它通过定义一套简洁而强大的API来实现这些功能,使得...
Struts是Apache软件基金会(ASF)旗下的一个开源项目,它是一个用于构建企业级Java Web应用程序的MVC(Model-View-Controller)框架。Struts 1.3.10是Struts 1系列的一个版本,提供了对Web应用的结构化支持,帮助...
标题中的"compass+ssh2集成 hibernategps问题"涉及到三个主要的技术概念:Compass、SSH2(可能是指的是Apache Struts 2或者Secure Shell 2)以及Hibernate GPS。接下来我们将详细探讨这些技术及其可能的问题。 1. *...
Struts框架是Apache基金会Jakarta项目组中的一个开源项目,它是一个基于MVC架构的Web开发框架。在Struts框架中,Servlet作为控制器,JSP作为视图,JavaBean作为模型。 **图1-6 Struts MVC架构** ![Struts MVC架构]...
Struts框架遵循MVC(Model-View-Controller)设计模式,它是Apache Jakarta项目的一部分,专门为J2EE环境设计。MVC模式将应用程序分为三个核心组件: 1. **模型(Model)**:负责管理应用程序的数据逻辑,通常与...
7. **struts2-dojo-plugin-2.1.8.1.jar**:Struts 2是基于MVC架构的Web应用框架,而Dojo插件则扩展了Struts 2的功能,引入了Dojo JavaScript库,用于创建交互式的Web用户界面。 8. **xwork-core-2.1.6.jar**:XWork...
Struts是Apache软件基金会的一个开源项目,它是MVC(Model-View-Controller)设计模式的一个实现,主要用于Java Web应用程序的开发。Struts提供了控制器组件,帮助开发者将业务逻辑与表现层分离,提高了代码的可维护...
2. **插件架构(Plugin Architecture)**:Struts2支持多种插件,如Freemarker和Velocity视图技术、JSON和XML数据格式化、Tiles布局框架等,使得开发者能够灵活选择合适的技术栈。 3. **OGNL(Object-Graph ...