首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Struts2中获取全部Action对应的Name的方式

2012-10-16 
Struts2中获取所有Action对应的Name的方式写道Dispatcher dispatcher Dispatcher.getInstance()Configu

Struts2中获取所有Action对应的Name的方式
写道Dispatcher dispatcher = Dispatcher.getInstance();

ConfigurationManager cm = dispatcher.getConfigurationManager();

Configuration cf = cm.getConfiguration();

RuntimeConfiguration rc = cf.getRuntimeConfiguration();

Map<String, Map<String, ActionConfig>> d = rc.getActionConfigs();

for (String key1 : d.keySet())
{
System.out.println(key1);
Map<String, ActionConfig> a = d.get(key1);
for (String key2 : a.keySet())
{
System.out.println(key2);
ActionConfig ac = a.get(key2);
}
}?

热点排行