struts2框架搭建第三天
2010-10-22 15:58
288 查看
1, Result 的type属性
redirectAction :重定向到一个action
redirect :重定向到界面
dispacher: 转发到jsp(默认)
chain:转发到action (使用此类型转发时在<result>标记内需要加入 <param>标记以制定 ,该转向的action名称和 命名空间。)
例如:
<param type="actionName">action的名字</param>
<param type="namespace">/命名空间的名字</param>
2,拦截器
1,Interceptor 接口
2, AbstractInterceptor 适配器模式(抽象类)
3,MethodFilerInterceptor 进行更细致的过滤 (抽象类)
=================
1,国际化:
i18n:Internationnalization
1,struts.xml
<constant name="struts.custom.i18n.resources" value="globalMessage"></constant>
2,命名规范: properties
globalMessage_en_US.properties
user="UserName"
globalMessage_zh_CN.properties
user="用户名";
3,引入struts2标签
<s:text name="user"></s:text>
redirectAction :重定向到一个action
redirect :重定向到界面
dispacher: 转发到jsp(默认)
chain:转发到action (使用此类型转发时在<result>标记内需要加入 <param>标记以制定 ,该转向的action名称和 命名空间。)
例如:
<param type="actionName">action的名字</param>
<param type="namespace">/命名空间的名字</param>
2,拦截器
1,Interceptor 接口
2, AbstractInterceptor 适配器模式(抽象类)
3,MethodFilerInterceptor 进行更细致的过滤 (抽象类)
=================
1,国际化:
i18n:Internationnalization
1,struts.xml
<constant name="struts.custom.i18n.resources" value="globalMessage"></constant>
2,命名规范: properties
globalMessage_en_US.properties
user="UserName"
globalMessage_zh_CN.properties
user="用户名";
3,引入struts2标签
<s:text name="user"></s:text>
相关文章推荐
- 使用Struts2框架搭建Android服务器,模拟用户登录
- Struts2框架搭建
- 搭建EXTJS和STRUTS2框架(ext和struts2简单实例)
- [置顶] Struts2框架搭建与简单的登陆实例
- 搭建struts2框架
- Eclipse搭建Struts2框架(图文详解)
- Struts2框架的搭建及配置文件的配置
- Struts2框架的搭建
- Struts2框架搭建
- Struts2框架搭建
- 【实验】如何本地搭建Struts2框架对S2-045漏洞进行利用
- (Struts2 学习篇)Web 项目搭建Struts2框架
- 在eclipse中搭建struts2框架的详细过程
- 使用struts2框架搭建简单的登陆功能
- Struts2框架搭建及常见配置问题
- 如何搭建struts2框架
- struts2框架学习笔记1:搭建测试
- Struts2框架搭建
- Struts2框架学习(一)——Struts2的概念及搭建
- struts2框架搭建