在实际开发中,往往会由于action的过多导致struts.xml的臃肿。因此需要划分struts.xml
<?xml version="1.0" encoding="GBK"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<include file="struts-user.xml"/>
<include file="struts-customer.xml"/>
</struts>
注意配置的包的名字不能相同
本文介绍了一种方法,通过将Struts.xml中的action进行划分,使用includefile指令来减小配置文件的大小,提高开发效率。
2561

被折叠的 条评论
为什么被折叠?



