org.directwebremoting.impl.ContainerUtil:
public static void setupDefaults(DefaultContainer container, ServletConfig servletConfig) throws InstantiationException, IllegalAccessException
{
... ...
if (servletConfig.getServletContext().getServerInfo().startsWith("jetty-"))
{
container.addParameter(ServerLoadMonitor.class.getName(), ThreadDroppingServerLoadMonitor.class.getName());
}
else
{
container.addParameter(ServerLoadMonitor.class.getName(), DefaultServerLoadMonitor.class.getName());
}
... ...
}
代码中 if (servletConfig.getServletContext().getServerInfo().startsWith("jetty-"))判断是否jetty服务器,用"jetty-"来判断是错误的,server info实际的实际格式是"jetty/7.0.1.v20091125",所有永远判断不出是jetty服务器,只能按DefaultServerLoadMonitor.class处理。
正确的应该为:if (servletConfig.getServletContext().getServerInfo().startsWith("jetty"))