zoukankan      html  css  js  c++  java
  • 在eclipse上写代码的时候,tomcat突然不能用了,重启都是闪一下就关了

    严重: A child container failed during start

    严重: The required Server component failed to start so Tomcat is unable to start.

    警告: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []

    在日志中发现有这些信息,把tomcat/conf/server.xml中的<Context path="/" docBase="E:\project\cart\web" debug="0" reloadable="false" />注释掉就好了

    可是注释掉以后就不能启动web项目了,所以还是没有解决问题,继续看log文件:发现了这句话:

    Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name OrderItemServlet

    再去看一下web.xml,果然在servlet-mapping中的一个servlet-name写错了,改正之后,就OK了。

    总结:

    原来web.xml对tomcat的启动都有这么大的影响,厉害了

  • 相关阅读:
    java-Math类
    java-Random类
    java-SimpleDateFormat类
    java-Calendar类+
    java-Calendar类
    java-System类
    java-Integer的面试题
    Android中怎么用this
    adapter(转自Devin Zhang)
    实例变量和局部变量
  • 原文地址:https://www.cnblogs.com/czp2bconfident/p/8683006.html
Copyright © 2011-2022 走看看