java 错误 invalid character found in method name. http method names must be tokens
本篇文章将介绍 tomcat 的一些可能的原因和ag捕鱼王app官网的解决方案:java.lang.illegalargumentexception: invalid character found in method name. http method names must be tokens。
tomcat 的 java.lang.illegalargumentexception: invalid character found in method name. http method names must be tokens 原因
以下是导致错误发生的一些可能情况。
当用户尝试在未启用 https 的端点上执行来自客户端的 https 请求时,可能会遇到此异常。 当服务器只关注原始数据时,客户端会对请求的数据进行加密。
换句话说,每当服务器预期的内容与收到的内容之间存在差异时,通常就会发生这些异常。 您刚才所描述的就是众多可想象的结果之一。
您的服务器可能有一个不符合 https 标准的端点。
在某些情况下,content-length 标头的值与正文的长度不对应。
当您尝试在部署应用程序的服务器上使用不支持的 uri 方案时,通常会发生此错误。
tomcat 中 java.lang.illegalargumentexception: invalid character found in method name. http method names must be tokens 的ag捕鱼王app官网的解决方案
下面列出了可以应用的解决问题的选项。
-
将客户端 url 中的 https 替换为 http。 这样做很可能会有效。 例如,如果使用
http://localhost:8080/foo/bar
访问本地服务器,则使用 urlhttps://localhost:8080/foo/bar
来访问它。 -
按 ctrl shift delete 控件清除浏览数据,然后单击“清除数据”,如代码片段所示。
-
清除 ssl 状态 由于无法从 pc 上 google chrome 的浏览器设置内部删除 ssl 状态,因此必须通过操作系统的设置来完成此操作。 因此,请按照以下说明清除 ssl 状态。
-
在开始菜单中,搜索“internet 选项”并将其打开。
-
单击出现的对话框中的“内容”选项卡。
-
单击清除 ssl 状态按钮。
-
单击“确定”,ssl 状态将被清除。
-
在开始菜单中,搜索“internet 选项”并将其打开。
-
为应用程序配置https协议,需要证书。 let's encrypt 是一个可以为您提供证书的资源。 生成和获取自签名证书的过程是最简单的选择。
-
首先为应用程序创建一个密钥库文件。 该文件的功能更像是 https 协议的自签名证书。
sudo keytool -genkey -keyalg rsa -alias tomcat -keystore /usr/share/tomcat.keystore
-
接下来,在 tomcat 服务器配置文件 (/opt/tomcat/conf/server.xml) 中,为应用程序添加 https tomcat 服务器连接器:
sudo nano /opt/tomcat/conf/server.xml
-
通过添加以下内容来完成应用程序的设置。 请注意,已提供密钥库文件的路径和密码。 此外,还指定了与 http 端口分开的 https 端口。
"org.apache.coyote.http11.http11protocol" port="8443" maxthreads="200" scheme="https" secure="true" sslenabled="true" keystorefile="/usr/share/tomcat.keystore" keystorepass="my-password" clientauth="false" sslprotocol="tls" uriencoding="utf-8" compression="force" compressablemimetype="text/html,text/xml,text/plain,text/javascript,text/css"/>
-
首先为应用程序创建一个密钥库文件。 该文件的功能更像是 https 协议的自签名证书。
转载请发邮件至 1244347461@qq.com 进行申请,经作者同意之后,转载请以链接形式注明出处
本文地址:
相关文章
java 错误 java.net.socketexception: network is unreachable
发布时间:2023/07/16 浏览次数:963 分类:java
-
今天我们就来讨论一下java编程时出现java.net.socketexception: network is unreachable异常的可能原因及解决方法。java中出现java.net.socketexception: network is unreachable的可能原因及ag捕鱼王app官网的解决方案
java 错误 java.net.connectexception: connection timed out
发布时间:2023/07/16 浏览次数:235 分类:java
-
本篇文章将重点介绍如何使用此包进行基本的网络调用以及可能面临和解决的错误。在 java 中使用 java.net 进行网络调用 进行网络调用是 java 开发人员每天面临的最重要的事情之一。
java 中错误 attempt to invoke virtual method on a null object reference
发布时间:2023/07/16 浏览次数:948 分类:java
-
本篇文章介绍如何解决 java 中的 attempt to invoke virtual method on a null object reference 错误。java 中 attempt to invoke virtual method on a null object reference 错误
java 错误 java.security.invalidkeyexception: illegal key size
发布时间:2023/07/15 浏览次数:644 分类:java
-
本篇文章介绍包含 java.security.invalidkeyexception: illegal key size 的 java 代码。 然后,我们将了解其可能的原因。最后,它通过消除指定的错误来引导我们找到ag捕鱼王app官网的解决方案。
发布时间:2023/07/15 浏览次数:165 分类:java
-
本篇文章介绍如何解决 java 中的 java.sql.sqlexception: access denied for user 'root'@'localhost' 错误。修复 java 中的 java.sql.sqlexception: access denied for user 'root'@'localhost' (using password: yes)
发布时间:2023/07/15 浏览次数:885 分类:java
-
本篇文章介绍了 java 中 java gateway process exited before sending the driver its port number 错误 java gateway process exited before sending the driver its port number 错误
修复 java 中 java.net.bindexception: address already in use: bind 错误
发布时间:2023/07/15 浏览次数:250 分类:java
-
本篇文章介绍了 java 中的 java.net.bindexception:address already in use: bind 错误。修复java 中的 java.net.bindexception:address already in use: bind
java 中错误 unsupported major minor version
发布时间:2023/07/14 浏览次数:133 分类:java
-
出现 unsupported major.minor version 错误或 java.lang.unsupportedclassversionerror 的原因是运行时 jdk 较低,编译时 jdk 较高。 本篇文章介绍如何解决java中不支持的major.minor版本。
java 错误 error:java: javactask: source release 1.8 requires target release 1.8
发布时间:2023/07/14 浏览次数:274 分类:java
-
在使用intellij for java时,无法编译java程序是一个常见的问题。 本教程提供了此错误的ag捕鱼王app官网的解决方案。error:java: javactask: source release 1.8 requires target release 1.8 错误