`

XWork Configuration (1)

阅读更多
个人感觉很是重要或经典,摘抄下来;

Start:

1.WebWork - WebWork - Package Configuration:
Packages are a way to group Actions, Results, Result Types, Interceptors and Stacks into a logical unit that shares a common configuration.

(Packages是把Actions, Results, Result Types, Interceptors和Stacks分组成逻辑单元的一种方式,以分享一些共同设置).

Package Configuration (zh_cn)  (en)

2.WebWork - WebWork - Namespace Configuration:
The default namespace, which is "" (an empty string) is used as a "catch-all" namespace, so if an action configuration is not found in a specified namespace, the default namespace will also be searched.This allows you to have global action configurations outside of the "extends" hierarchy, as well as to allow the previous Webwork 1.x behavior by not specifying namespaces. It is also intended that the namespace functionality can be used for security, for instance by having the path before the action name be used as the namespace by the Webwork 2.0 ServletDispatcher, thus allowing the use of J2EE declarative security on paths to be easily implemented and maintained.

(默认名称空间用""(空字符串)表示.如果系统在指定的名称空间中没有找到某个action,就会到默认名称空间中查找.你可以在所有用"extends"扩展的名称空间外配置全局action,就像Webwork 1.x那样不指定名称空间.名称空间也可以用来实现系统安全,例如action名字之前可以有个路径,这个路径就是Webwork 2.0 ServletDispatcher用的名称空间,你可以在路径上使用J2EE声明式的安全限制,这种方式很容易的实现和维护).

Namespace is only one level. For example if the url '/barspace/myspace/bar.action' is requested, Webwork will try to search for namespace '/barspace/myspace', which does not exist in this case, and will fall back to the default namespace '' and tried the search for action with 'bar' alias. As a result the bar action in the default will be used.

(名称空间只有一个级别.例如如果url是'/barspace/myspace/bar.action',Webwork先试着查找'/barspace/myspace',在本例中是不存在的.接着就直接到''空间中查找'bar'这个action别名.结果在默认空间中的bar会被执行).

Namespace Configuration (zh_cn) (en)
分享到:
评论

相关推荐

    xworkdocs 对struts2学习有帮助

    Document generated by Confluence on Feb 16, 2007 07:19 Page 1 · Action configuration · Include configuration · Interceptor Configuration · Namespace Configuration · Package Configuration · ...

    xwork-2.1.2-lib.zip

    XWork is an command-pattern framework that is used to power WebWork as well as other applications. XWork provides an Inversion of Control container, a powerful ...validation, and pluggable configuration.

    struts-2.1.6.chm

    com.opensymphony.xwork2.config Configuration core classes. com.opensymphony.xwork2.config.entities Configuration entity classes. com.opensymphony.xwork2.config.impl Configuration implementation ...

    struts 2.3.4.1 最新英文版API

    com.opensymphony.xwork2.config Configuration core classes. com.opensymphony.xwork2.config.entities Configuration entity classes. com.opensymphony.xwork2.config.impl Configuration implementation ...

    struts2必备包必须

    com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69) 提示各种奇怪的启动错误,原因就是缺少包,这里面是必须的包

    Struts课堂笔记.rar--struts2的struts.properties配置文件详解

    The org.apache.struts2.config.Configuration implementation class org.apache.struts2.config.Configuration接口名 struts.configuration.files A list of configuration files automatically loaded by ...

    struts-2.3.4.1所需的jar文件

    接触新版本出了问题后,解决了把jar文件上传上来供... "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> /helloWorld.jsp </struts>

    精通Java EE整合应用案例 源代码19章 chat

    commons-configuration-1.2.jar commons-dbcp-1.2.1.jar commons-logging-1.0.4.jar commons-pool-1.3.jar dom4j-1.6.1.jar ehcache-1.2.3.jar freemarker-2.3.8.jar hibernate-3.2.0.ga.jar jta-1.0.1B.jar log4j-...

    最新Struts2+jq+ajax+json 学会总要4步‵‵超级简单,里面包含实例

    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> 包名自定义 " extends="json-default(一定要的)" namespace=""> (action名)" class=...

    struts项目搭建

    import com.opensymphony.xwork2.ActionSupport; public class HelloWorldAction extends ActionSupport { /** * */ private static final long serialVersionUID = 1L; public String execute(){ return ...

    图解SSH框架配置步骤

    我们需要引入Struts2必需的五个jar包,包括Commons-logging-1.0.4.jar、Freemarker-2.3.13.jar、Ognl-2.6.11.jar、Struts2-core-2.1.6.jar和Xwork-2.1.2.jar。 3.2 修改WEB-INF下的web.xml文件 我们需要修改WEB-...

    用Struts2新建一个应用的方法步骤

    1.首先新建一个Web Project。File——new——Web Project,在Project Name中输入一个合法的名字。例如:struts2 2. 单击采单Window——Preference——Java——Installed JREs选中jdk1.6,如果没有单击右边的ADD添加...

Global site tag (gtag.js) - Google Analytics