MCPcopy Create free account
hub / github.com/diyhi/bbs / getUrl

Method getUrl

src/main/java/cms/utils/WebUtil.java:67–76  ·  view source on GitHub ↗

获取网站URL @param request 请求信息 @return

(HttpServletRequest request)

Source from the content-addressed store, hash-verified

65 * @return
66 */
67 public static String getUrl(HttpServletRequest request) {
68 String port = "";
69 if(request.getServerPort() != 80 && request.getServerPort() !=443){
70 port = ":"+request.getServerPort();
71
72 }
73
74
75 return request.getScheme()+"://"+request.getServerName()+port+request.getContextPath()+"/";
76 }
77
78 /**
79 * 获取网站虚拟路径

Callers 15

compareMethod · 0.95
domainMethod · 0.95
viewMethod · 0.95
filterHtmlMethod · 0.95
validBindURLMethod · 0.95
isFrontEndURLMethod · 0.95
deleteFrontEndURLMethod · 0.95
isLocalBindURLMethod · 0.95
deleteLocalBindURLMethod · 0.95
domainMethod · 0.95
fileServerAddressMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected