- 浏览: 722322 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (439)
- 生活小感 (9)
- Java (65)
- 笔面经 (18)
- 算法 (45)
- 读书笔记 (1)
- Android (147)
- 设计模式 (7)
- C语言 (7)
- 职业生涯 (6)
- 网络 (5)
- 数据库 (3)
- Linux/Unix (21)
- C++ (7)
- 思考 (3)
- WinPhone (4)
- Git (6)
- http (1)
- UML (1)
- SQL (2)
- Ant (1)
- iOS (14)
- FFmpeg (22)
- WebRTC (10)
- Mac (2)
- web (0)
- TCP (2)
- Vim (2)
- OpenSSL (1)
- OpenGL (6)
- 多媒体 (10)
- cocos2d (2)
- svn (1)
最新评论
-
wahahachuang8:
我觉得这种东西自己开发太麻烦了,就别自己捣鼓了,找个第三方,方 ...
WebSocket初探【转】 -
ding335306:
这个目录下没有找到此文件
eclipse.ini in MAC -
songshuaiyang:
哥们写东西可真乱啊
Android获取cpu和内存信息、网址的代码 -
zhoutao_temp:
这是自己能看懂还是让别人能看得懂,您就不能把版面稍微整理一下吗 ...
FFMPEG源码分析 -
chriszeng87:
string2020 写道git clone --bare表示 ...
复制git库
一些基础性的东西: 1. Struts 2 sits on top of two important technologies. At the heart of all Struts2 applications lie the client/server exchanges of the HTTP protocol. The Java Servlet API exposes these lowlevel HTTP communications to the Java language.Although it’s possible to write web applications by directly coding against the Servlet API, this is generally not considered a good practice. Basically, Struts 2 uses the Servlet API so that you don’t have to. But while it’s a good idea to keep the Servlet API out of your Struts 2 code, it seems cavalier to enter into Struts 2 development without some idea of the underlying technologies. The next two sections provide concise descriptions of the more relevant aspects of HTTP and Java Servlets.它们的关系见附件图1。
2.Struts等框架都用到了HTTP协议 Most web applications run on top of HTTP. This protocol is a stateless series of client/server message exchanges. Normally, the client is a web browser and the server is a web or application server. The client initiates communication by sending a request for a specific resource. The resource can be a static HTML document that exists on the server’s local file system, or it can be a dynamically generated document with untold complexity behind its creation. 看来有空真的要看看《TCP/IP详解》
3.很重要的一个问题,什么是框架? A framework is a piece of structural software. We say structural because structure is perhaps a larger goal of the framework than any specific functional requirement. A framework tries to make generalizations about the common tasks and workflow of a specific domain. The framework then attempts to provide a platform upon which applications of that domain can be more quickly built. The framework does this primarily in two ways. First, the framework tries to automate all the tedious tasks of the domain. Second, the framework tries to introduce an elegant architectural solution to the common workflow of the domain in question.
4.为什么要使用框架? First, new developers will always have to learn the framework(你自己开发的框架) from the ground up. If you’re using a mainstream framework,there’s a trained work force waiting for you to hire them. Second, the in-house framework is unlikely to see elegant revisions that keep up with the pace of industry.In-house frameworks seem to be subject to architectural erosion as the years pass, and too many extensions are inelegantly tacked on.
5.拦截器的概念 Interceptors are Struts 2 components that execute both before and after the rest of the request processing. They provide an architectural component in which to define various workflow and cross-cutting tasks so that they can be easily reused as well as separated from other architectural concerns.
6.ValueStack的概念 Struts 2 uses the ValueStack as a storage area for all application domain data that will be needed during the processing of a request. Data is moved to the ValueStack in preparation for request processing, it is manipulated there during action execution, and it is read from there when the results render their response pages.
7.OGNL的概念 OGNL is a powerful expression language (and more) that is used to reference and manipulate properties on the ValueStack. 8.Two mechanisms for declaring your architecture Through XML-based configuration files or through Java annotations.
<action name="Login" class="manning.Login">
<result>/AccountPage.jsp</result>
<result name="input">/Login.jsp</result>
</action>
<action name="Registration">
<result>/Registration.jsp</result>
</action>
<action name="Register" class="manning.Register">
<result>/RegistrationSuccess.jsp</result>
<result name="input">/Registration.jsp</result>
</action>
或者: @Results({ @Result(name="input", value="/RegistrationSuccess.jsp" ) @Result(value="/RegistrationSuccess.jsp" ) })
public class Login implements Action {
public String execute() {
//Business logic for login
}
}
我还是不会写读书笔记,感觉完全是书摘了.....
发表评论
-
Java Classloader机制解析
2015-07-14 14:14 814做Java开发,对于ClassLoader的机制是必须要熟悉 ... -
JVM Internals
2014-12-05 11:04 752This article explains the ... -
JVM必备指南
2014-11-01 11:20 452本文由 ImportNew - xiafei 翻译自 ant ... -
open jdk源码下载地址
2014-10-13 23:19 1097OpenJDK 和Oracle JDK 共用了大量相同的代码 ... -
Java中System.loadLibrary() 的执行过程
2014-10-10 11:45 6086转自:http://my.oschina.net/wolfc ... -
java 垃圾回收总结
2014-10-03 22:47 694转自:http://www.cnblogs.com/aigo ... -
java中volatile关键字的含义
2014-10-03 22:39 604转自:http://www.cnblogs.com/aigo ... -
java并发编程-Executor框架
2014-10-01 23:40 541Executor框架是指java 5中 ... -
Java中ArrayList和LinkedList区别
2014-09-17 18:48 541转自:http://pengcqu.iteye. ... -
深入理解Java内存模型之系列篇
2014-09-16 11:16 827转自:http://blog.csdn.net/ ... -
Java Thread 总结
2014-09-15 22:39 568转自:http://www.cnblogs.com/Drea ... -
如何停止一个正在运行的java线程
2014-09-15 22:33 1955转自:http://ibruce.info/2013/12 ... -
详解sleep和wait的区别
2014-09-15 22:16 2441转自:http://www.cnblogs.com/Dre ... -
Java多线程总结之由synchronized说开去
2014-09-14 13:11 626转自: http://hellosure.iteye.co ... -
ThreadLocal的正确用法
2014-09-13 23:52 474用法一:在关联数据类中创建private static ... -
Hashtable与ConcurrentHashMap差别
2014-09-06 00:00 883Hashtable与ConcurrentHashMap区别 ... -
JAVA多线程和并发基础面试问答
2014-09-01 22:56 649多线程和并发问题是Jav ... -
java 双重加锁及单例模式
2014-08-25 18:02 1134单例创建模式是一个通用的编程习语。和多线程一起使用时,必需使 ... -
Java内部类的使用小结
2014-08-13 21:45 540内部类是指在一个外部类的内部再定义一个类。类名不需要和文件夹 ... -
java sleep和wait的区别和联系
2014-08-10 20:46 630第一种解释: 功 ...
相关推荐
Struts2_Action学习笔记、通配符{1},{2}......
三、 Namespace Namespace决定了action的访问...是用来解决重名的问题,例如当系统的前台和后台都有一个action名叫hello,这时就需要用package来区分。 前台后台 struts2中的package与java的package是相同的作用的。
struts2学习笔记,拦截器,action,所需jar包,从零开始
01 Struts2-Action 5 一、 Struts作用: 5 二、 搭建Struts2的运行环境: 5 三、 Namespace 6 四、 标签 6 五、 Action 6 六、 路径问题的说明 8 七、 Action的动态调用方法 8 八、 Action通配符(wildcard)的配置 9 ...
建立一个Struts2 工程,用Action的属性接收参数,使用Domain Model (实体模型) 接收参数,Struts2_2.1.6版本的中文问题,Struts模块包含,Struts简单数据验证 ,Struts ValueStack(值栈) Debug,Value Stack ...
SSH笔记-Spring整合Struts2,作用是使用 IOC 容器来管理 Struts2 的 Action
Struts 读书笔记,一小段内容摘抄: ...... Struts的ActionForm 对象是框架用来在用户和业务层之间来回传递数据的。框架会自动收集请求的输入,然后使用from bean 将数据传递给Action,最后再传递给业务层。 对于...
详细讲解struts2中单个action中多个处理逻辑的配置方法, 以及默认Action的配置.
我的笔记:Struts构架中action的跳转大全
Struts2 是一个非常优秀的MVC框架,基于Model2 设计模型 由传统Struts1和WebWork两个经典框架发展而来 Struts2框架=Struts2+XWork Strust2 核心功能 允许POJO(Plain Old Java Objects,简单javabean对象,没有继承,...
struts2学习笔记!因为还没有全部学完,所以分部分分享!主要内容:struts.xml配置,web.xml配置 Action要点!全局类型转换,部分类型转换,类型转换文件 类型装换错误的处理问题局部使用,把中文汉字转换为编码 struts2对...
struts.action.extension The URL extension to use to determine if the request is meant for a Struts action 用URL扩展名来确定是否这个请求是被用作Struts action,其实也就是设置 action的后缀,例如login....
建立一个Java Web项目,提取最少运行Struts2应用的包集合,目标:实现一个简单的用户登录 包括内容: 一、先实现登录页面 二、实现处理页面的Action 三、配置Web.xml 四、配置Action处理结果和资源资源之间的映射关系 ...
当前struts2的filter过滤到一个.action结尾的请求的时候,会把这个请求交给struts2内部的拦截器(interceptor) 2)拦截器起到什么作用 可以帮我们丰富action的功能,比自动类型转换(页面传一个String类型的id,接收的...
Struts 1.3 备忘笔记 【资源特点】 1、以项目形式组织,包含所有的源代码 2、内含详细的注释说明 3、知识点较全面 【内容目录】 01 Struts_01HandworkApply : 手工配置Struct应用程序,演示用户提交数据后服务器的...
struts2学习笔记 很基础 容易懂第一个struts2的web用户登录工程:创建一个web工程->创建login.jsp(创建advanced的JSP)->登录的form表单(注意:action=“login.action”)->编写完成后配置
action 的一些基础操作 的学习过程
Struts高级部分(2)(常用Action、验证框架、动态Form)笔记Struts高级部分(2)(常用Action、验证框架、动态Form)笔记
当要从Action中执行的loadCity方法,要返回到jsp页面时,要在页面上指定一个return的页面.我们在admin-action.xml配置中可以看到一句 <result name="city">/admin/city.jsp 而在loadCity方法中有这样一句 return "city...
struts2学习笔记,总结了很多学习的经验,标签的使用,action的使用。struts2.0 和 struts2.1 的区别