本文介绍了如何使java-tomee应用程序使用HTTPS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在使用Java和apache tomee开发一个Web应用程序,但是我想将其设置为https,以便可以将其提供给一些客户端,但是我不知道如何创建证书并使该应用程序通过安全通道.
I have been developing a web application with java and apache tomee, but I want to make it https so I can offer it to a few clients but I have no idea on how to create the certificates and make the application go through a secure channel.
我尝试了一些教程,但似乎没有任何运气.
I have tried a few tutorials bit I don't seem to have any luck.
有人知道怎么做吗?
非常感谢您!
推荐答案
编辑server.xml
:
!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="443"
maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreType="Windows-MY"
keyAlias="MyKeyAliasInWindowsKeystore"
clientAuth="false"
sslProtocol="TLS"/>
Tomee本质上是带有一堆J2EE库的tomcat,因此SSL功能实际上是由Tomcat执行的.
Tomee is basically a tomcat with a bunch of J2EE libraries, so the SSL function is actually performed by Tomcat.
https://tomcat.apache.org/tomcat-7.0 -doc/ssl-howto.html
这篇关于如何使java-tomee应用程序使用HTTPS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!