struts2(包含配置)(团队开发,多配置文件)
2016-05-10 16:51
429 查看
Struts2对团队开发的支持(多配置文件)
1、可以为某个模块建立单独的配置文件,该配置文件的格式需要和struts.xml配置文件的格式一致
2、在struts.xml配置文件中采用标签引入
struts.xml
struts.-user-mgr.xml
1、可以为某个模块建立单独的配置文件,该配置文件的格式需要和struts.xml配置文件的格式一致
2、在struts.xml配置文件中采用标签引入
struts.xml
<struts> <!-- 当struts.xml配置文件发生修改,会立刻加载,在生产环境下最好不要配置 --> <constant name="struts.configuration.xml.reload" value="true"/> <!-- 会提供更加友好的提示信息 --> <constant name="struts.devMode" value="true"/> <!--采用include引入外部配置文件,可以多个--> <include file="struts-user-mgr.xml"/> </struts>
struts.-user-mgr.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <package name="struts2" extends="struts-default"> <action name="login" class="com.bjpowernode.struts2.LoginAction" method="add"> <result name="success">/login_success.jsp</result> <result name="error">/login_error.jsp</result> </action> </package> </struts>
相关文章推荐
- Struts - 标签库
- struts1.0于struts2.0的比较
- Struts2中关于namespace的学习心得
- Struts2----自定义action的学习心得
- HTTP Status 404 - There is no Action mapped for namespace [/] and action name [login!welcome] associ
- struts2
- SSH学习笔记---struts2 spring集成时action的class的值
- ssh--问题记录
- struts 学习笔记
- Struts2 的基本配置
- struts2框架架构流程
- struts2.0拦截器(实现未登录的用户不能访问系统的页面)(转)
- Struts2 面试题分析
- Struts2+jQuery+JSON实现异步交互
- 软件开发疑惑解答
- ajax ssh 整合
- 关于struts2框架学习
- struts2 @Action给方法注解
- struts2登陆拦截器
- struts2框架原理