Zillionnn 2015-12-09 13:37 采纳率: 28.6%
浏览 3000

springMVC的web.xml,加listener有什么要求吗,不能启动

 [2015-12-09 09:36:26,193] Artifact demoAmiguo3:war exploded: Artifact is being deployed, please wait...
十二月 09, 2015 9:36:26 下午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(G:\PROJECT\demoAmiguo3\target\spring\WEB-INF\lib\servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
十二月 09, 2015 9:36:26 下午 org.apache.catalina.deploy.WebXml setVersion
警告: Unknown version string [3.1]. Default version will be used.
十二月 09, 2015 9:36:27 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
十二月 09, 2015 9:36:27 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
十二月 09, 2015 9:36:27 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [] startup failed due to previous errors

上面是报错的,

  • 写回答

3条回答

  • pucheung 2015-12-10 04:36
    关注

    建议把完整的错误贴出来,listener监听器,是spring提供的,表示在启动程序的时候会去加载一些配置文件 而这些配置文件是需要在context-param中
    去配置的,当然我们还有另外一种方式去加载配置文件,那就是直接在web.xml中dispatcherServlet中去配置init-param来指定配置文件。另外还有一种方式比较固定
    那就是我们既不需要配置listener也不需要init-param,直接在web-inf下配置applicationContext-servlet.xml 注意必须使用固定的文件名

    评论

报告相同问题?

悬赏问题

  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗
  • ¥15 钢筋实图交点识别,机器视觉代码
  • ¥15 如何在Linux系统中,但是在window系统上idea里面可以正常运行?(相关搜索:jar包)
  • ¥50 400g qsfp 光模块iphy方案
  • ¥15 两块ADC0804用proteus仿真时,出现异常
  • ¥15 关于风控系统,如何去选择
  • ¥15 这款软件是什么?需要能满足我的需求
  • ¥15 SpringSecurityOauth2登陆前后request不一致