启动Tomcat报错,

来源:百度知道 编辑:UC知道 时间:2024/06/22 19:32:46
严重: Parse error in application web.xml file at jndi:/localhost/WEB-INF/web.xml
java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name online

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:930)
at org.apache.catalina.startup.CallMethodMultiRule.end(WebRuleSet.java:794)
at org.apache.tomcat.util.digester.Rule.end(Rule.java:229)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1058)

你的web.xml里有错误。你定义的servlet name是不准确的,可能是你定义不同的名字了,导致系统不知道你要找的是哪个servlet。所以报错了,你仔细检查xml

web.xml中对servlet的mapping定义有错,web.xml中定义的servlet-mapping中的servlet-name要和servlet的servlet-name一致

提示不合法的参数异常