小技巧

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1178)

The following method did not exist:

    javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;

The method's class, javax.servlet.ServletContext, is available from the following locations:

    jar:file:/E:/maven/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/javax/servlet/ServletContext.class
    jar:file:/E:/maven/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.19/tomcat-embed-core-9.0.19.jar!/javax/servlet/ServletContext.class

It was loaded from the following location:

    file:/E:/maven/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar

-------------------------

拷貝最新下載的tomcat裏面的lib的包servlet-api.jar 到這個裏面
C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext

 

我的這個問題是,idea運行時,在自帶的tomcat目錄下沒找到servlet-api.jar這個包 和 jdk目錄下,也沒有找到這個包。

解決方法。就是導入servlet-api.jar並在 jdk目錄下粘帖一份。

http://keyblog.cn/article-87.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章