ServletActionContext.getRequest().getScheme() //协议 如http
+ "://"
+ ServletActionContext .getRequest().getLocalAddr() //ip地址
/*+ ServletActionContext.getRequest().getServerName()*/
+ ":"
+ "://"
+ ServletActionContext .getRequest().getLocalAddr() //ip地址
/*+ ServletActionContext.getRequest().getServerName()*/
+ ":"
+ ServletActionContext.getRequest().getServerPort() //端口号
getLocalAddr遇到localhost会自动变为127.0.0.1,遇到ip形式的就为ip
getServerName可能会把ip变为localhost
(getLocalAddr 遇到ip变为127.0.0.1,外网地址变为内网地址
getServerName 遇到ip就为ip 20140410)