HTTPS连接错误

我正在尝试使用http url连接来连接到一个servlet,即http:// localhost:9481 / test / NewServlet 。 它为我工作得很好。 现在我想使用https:// localhost:9481 / test / NewServlet进行连接 。 我得到了这样的错误:

Error code: ssl_error_rx_record_too_long,Connection refused... 

我需要在server.xml中编辑任何东西:

目前看起来像:

 <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" /> 

我仍然会回答这个问题,即使这个问题是不正确的。

问题似乎是,即使您更改为HTTPS,也不会将端口号更改为8443.您的浏览器抱怨的可能原因是,您在浏览器认为是HTTP协议的情况下将正常的HTTP内容加以标记。

切换到端口8443,然后重试。