[JAVA] Struts2 Core Config简述

来源:互联网 发布:琉璃神社新的域名 编辑:程序博客网 时间:2024/06/10 13:10

1. Struts-default 配置中的Result type



默认的result type  为dispatcher

当result type 为plainText

当result type为redirect, 页面重定向,但无法共享页面参数

2. 将***.action可更改为***.do,新建struts.properties, 将action改为do



也可以将struts.properties中的常量设置放在struts.xml中 [关于常量的配置,可以放在struts.properties,struts.xml,web.xml这些文件中]


3. package中namespace的设置, 当action name相同时,可以用namespace加以区分。此外,抽象包不能包含action,struts.xml中可以有多个不同名的package


4. 通过include file将struts配置加入到struts.xml,实现分模块配置struts


重要说明:

1.上述内容非原创,实转载网易课堂javaEE视频教程。
2. 仅为个人记忆,便于日后回忆。

原创粉丝点击