embedded 嵌入式tomcat
请教各位大神,嵌入式tomcat,我调用API启动tomcat为什么老是报No global web.xml found,tomcat版本是apache-tomcat-7.0.42-embed,具体错误如下:信息: Dual registration of jndi stream handler: factory already defined
2013-8-26 10:49:54 org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
信息: No global web.xml found
2013-8-26 10:49:54 org.apache.tomcat.util.digester.Digester endElement
严重: End event threw exception
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter
at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:855)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051)
我的启动代码:
Tomcat tomcat = new Tomcat();
tomcat.setPort(port);
tomcat.setBaseDir(catalinaHome);
tomcat.getHost().setAppBase(appHome);
try {
StandardServer server = (StandardServer)tomcat.getServer();
server.addLifecycleListener(new AprLifecycleListener());
tomcat.addWebapp(name, appHome);
tomcat.start();
return true;
} catch (Exception e) {
return false;
}
谷歌百度都找不到问题所在,还望各位帮忙解答呀 tomcat web.xml embedded 嵌入式 --------------------编程问答-------------------- 在tomacat的context.xml里加上<Loader delegate="true" /> --------------------编程问答--------------------
我加了,但是没有效果呀 --------------------编程问答-------------------- 缺jar包吧? --------------------编程问答-------------------- 直接下载下来的好像缺几个jar包 --------------------编程问答--------------------
缺哪些啊?下面是我的架包截图,麻烦帮忙看下哈 --------------------编程问答--------------------
把tomcat完整版的下下来,然后把lib里面的全拷过去
补充:Java , Java SE