zoukankan      html  css  js  c++  java
  • springmvc常遇到的错误

    错误1:

      HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

    NoClassDefFoundError指明没有该类的定义,就是缺少某个jar包导致的,去下载standard和jstl两个包然户放入lib下就好了。

    错误2:

      把springmvc发布到tomcat里,tomcat启动发生错误,很好可能就是缺少基本的相关jar包了,比如:

    A child container failed during start
    java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/01springmvc-hello]]

    这时缺少spring-web-4.0.0.RELEASE.jar所导致的。

    问题3:

      当修改action类或者controller类中内容时,但是运行发现还是未修改之前的处理方法,这个时候clean一下也许就会解决问题。选择project->clean,选择你要clean的项目。

    问题4

    Description Resource Path Location Type
    The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path index.jsp /maven1/src/main/webapp line 1 JSP Problem

    右键项目名build path->configure build path->libraries->add library->server runtime->tomcat

    问题5

    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

    这是缺少mysql-connector-java-x.x.x-bin.jar所至少,在lib加上该jar包,然后build path->add to build...。有时候弄完该步骤后还提示缺少com.mysql.jdbc.Driver,这就需要把mysql-connector-java-x.x.x-bin.jar拷贝放到tomcat的lib目录下就好了

  • 相关阅读:
    FZU 1005 Fast Food(dp)
    POJ 3186 Treats for the Cows(区间DP)
    2016郑州轻工业学院校赛 B 蛤玮的财宝
    c++大数模板
    2015轻院校赛 H五子棋
    poj 1015 Jury Compromise
    modbus协议说明(转)
    STM32 flash 内存分布介绍
    STM32 程序所占用空间计算 && FLASH存储的起始地址计算
    C float与char数组 互转
  • 原文地址:https://www.cnblogs.com/Hxinguan/p/5967231.html
Copyright © 2011-2022 走看看