gpt4 book ai didi

更改端口时Tomcat设置错误

转载 作者:行者123 更新时间:2023-11-28 21:47:53 28 4
gpt4 key购买 nike

我正在我的 Mac 上设置 Tomcat 服务器。使用默认端口 8080 ,tomcat 服务器启动正常。但是当我将端口更改为 9999 时,出现以下错误

 org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 70 column 21: Open quote is expected for attribute "{1}" associated with an element type "port".
org.xml.sax.SAXParseException: Open quote is expected for attribute "{1}" associated with an element type "port".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)

下面是我的server.xml文件

  <!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port=“9999” protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the BIO implementation that requires the JSSE
style configuration. When using the APR/native implementation, the
OpenSSL style configuration is required as described in the APR/native
documentation -->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->

使用以下命令运行tomcat

./catalina.sh 运行

最佳答案

这很简单...请仅在记事本中打开此文件..您使用的引述与 Tomcat 期望的引述之间存在差异。

它要的就是这个port="9999"并使用了不同的引号 port="9999" 请查看引号的不同之处。

关于更改端口时Tomcat设置错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24466177/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com