大家好,
小弟在网上找了很多学习struts2的东西 发现很多人都说roseindia的教程很好 但是全是英文 所以我想翻译一下 希望可以方便大家学习。
全教程总共分成80个小章节 下面是第一章 (希望大家多给意见一起学习)
It is very extensible as each class of the framework is based on an Interface and all the base classes are given an extra application and even you can add your own.
The strut-2 framework is designed for the compilation of the entire development cycle including of building, developing and maintaining the whole application. It is very extensible as each class of the framework is based on an Interface and all the base classes are given an extra application and even you can add your own. The basic platform requirements are Servlet API 2.4, JSP API 2.0 and Java 5.
struts-2 框架编纂了整个开发周期,包括建设,发展和维持整个应用程序。它是具有高扩展性的框架因为框架中的每个类都是基于接口的, 并且所有的基类在应用程序中都已经附带, 你甚至可以加入你自己的基类和应用程序。最低的环境需求是Servlet API 2.4, JSP API 2.0 和 Java 5.
Some of the general features of the current Apache Strut 2 framework are given below.
下面是apache struts 2 框架附带的基本功能。
Architecture �First the web browser request a resource for which the Filter Dispatcher decides the suitable action. Then the Interceptors use the required functions and after that the Action method executes all the functions like storing and retrieving data from a database. Then the result can be seen on the output of the browser in HTML, PDF, images or any other.
架构:首先浏览器会向struts2应用程序发出请求, 然后Filter Dispatcher会拦截请求 并把请求发给相应的action. 然后拦截器会调用一些必要的函数,接着action的executes方法会针对请求调用所有可用的方法, 例如:从数据库存储,检索数据。最后结果会以各种的形式返回给客户端浏览器, 比如 HTML, PDF, 图像 或者任何其它形式。
Tags - Tags in Strut 2 allow creating dynamic web applications
标签:struts2 的标签使得开发动态网络应用程序变得更加简单(需要手写的代码更少)。不仅是因为这些标签包含了输出数据而且也提供了样式表驱动的标记,从而有助于用更少的代码建立网页。这些标签同时支持验证和本地化使得struts2的标签利用率变高,数量较少的代码也可以很容易阅读和维护。
(明天继续)
欢迎大家多提意见, 希望对大家有帮助。