[英]Java WebService checking for SSL
I've developed a WSDL webservice in Java and I need to check if the connection/call/request was made via SSL (In short, only accept SSL connections/requests). 我已经用Java开发了WSDL Web服务,我需要检查是否通过SSL进行了连接/调用/请求(总之,仅接受SSL连接/请求)。 Is this possible?
这可能吗? I wasn't able to find anything relating to it, but I'm probably searching wrong.
我找不到任何与之相关的信息,但可能是搜索错误。
You don't need to do a second check on the Java side. 您无需在Java方面进行第二次检查。 Just define the resource correctly in
web.xml.
只需在
web.xml.
正确定义资源即可web.xml.
If you must check it for some reason, just check ServletRequest.isSecure()
. 如果由于某种原因必须检查它,只需检查
ServletRequest.isSecure()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.