jsp中地址

其中prj_01是应用名

path:  <%=request.getContextPath() %><br/>
 schema: <%=request.getScheme() %><br/>
 serverName: <%=request.getServerName() %><br/>
 serverPort: <%=request.getServerPort() %><br/>
 bathPath: <%=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"%><br/>

显示

path: /prj_01
schema: http
serverName: localhost
serverPort:
8080
bathPath: http://localhost:8080/prj_01/

I'm falling off the sky all alone.The courage inside is gonna break the fall. Nothing can dim my light within. I am That I am 程序 = 数据结构 + 算法
原文地址:https://www.cnblogs.com/IamThat/p/2909154.html