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/

你可能感兴趣的:(jsp)