简体   繁体   English

网址中的http或https

[英]http or https from url

Here's the scenario. 这是场景。

My Java web application has following path https://www.mywebsite.com:9443/MyWebApp Let's say there is a JSP file https://www.mywebsite.com:9443/MyWebApp/protected/index.jsp and I need to retrieve the above url within this JSP file. 我的Java Web应用程序具有以下路径https://www.mywebsite.com:9443/MyWebApp假设有一个JSP文件https://www.mywebsite.com:9443/MyWebApp/protected/index.jsp ,我需要在此JSP文件中检索上述url。 I can retrive everything but i need to retrieve the https as well. 我可以检索所有内容,但也需要检索https。 How can i retrive https in jsp file. 我如何在jsp文件中检索https。

string scheme = request.getscheme();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM