1.主要功能
在Dispatcher对象init或者destroy的时候执行某些代码接口如下
源代码上看只有Dispatcher.init()方法中和WebLogic相关的部分有调用到DispatcherListener的dispatcherInitialized方法,所有感觉该接口不是那么重要的样子。
在Dispatcher对象init或者destroy的时候执行某些代码接口如下
public void dispatcherInitialized(Dispatcher du) {
// do something to Dispatcher after it is initialized eg.
du.setConfigurationManager(....);
}
public void dispatcherDestroyed(Dispatcher du) {
// do some cleanup after Dispatcher is destroyed.
}
}
源代码上看只有Dispatcher.init()方法中和WebLogic相关的部分有调用到DispatcherListener的dispatcherInitialized方法,所有感觉该接口不是那么重要的样子。
private void init_CheckWebLogicWorkaround(Container container) {
// test whether param-access workaround needs to be enabled
if (servletContext != null && servletContext.getServerInfo() != null
&& servletContext.getServerInfo().indexOf("WebLogic") >= 0) {
LOG.info("WebLogic server detected. Enabling Struts parameter access work-around.");
paramsWorkaroundEnabled = true;
} else {
paramsWorkaroundEnabled = "true".equals(container.getInstance(String.class,
StrutsConstants.STRUTS_DISPATCHER_PARAMETERSWORKAROUND));
}
synchronized(Dispatcher.class) {
if (dispatcherListeners.size() > 0) {
for (DispatcherListener l : dispatcherListeners) {
l.dispatcherInitialized(this);
}
}
}
}
发表评论
- 浏览: 7947 次
- 性别:

- 来自: 福建福州

- 详细资料
搜索本博客
最新评论
-
struts2实践- 结合jquery ...
客户端和服务端配合验证的方案有吗?
-- by hotdog -
struts2实践- 结合jquery ...
只用js验证很不保险,服务端验证不可少
-- by kjj -
struts2实践- 结合jquery ...
jquery 比较耗资源~
-- by happy002 -
struts2实践-页面分页的 ...
能发一个吗 谢谢 dawnco@163.com
-- by adapt -
struts2实践- 结合jquery ...
long_jianxiu 写道不晓得有没有完整的代码,我现在弄的一头雾水的,不知 ...
-- by luckaway






评论排行榜