Java获取完整URL
2008-04-23 12:23
435 查看
/** *//**
public String getBackUrl(javax.servlet.http.HttpServletRequest request) throws Exception {
String strBackUrl = "";
try {
strBackUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + request.getServletPath() + "?" + this.codeToString(request.getQueryString());
strBackUrl = java.net.URLEncoder.encode(strBackUrl,"gbk");
} catch(Exception e) {
throw e;
}
return strBackUrl;
}
public String getBackUrl(javax.servlet.http.HttpServletRequest request) throws Exception {
String strBackUrl = "";
try {
strBackUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + request.getServletPath() + "?" + this.codeToString(request.getQueryString());
strBackUrl = java.net.URLEncoder.encode(strBackUrl,"gbk");
} catch(Exception e) {
throw e;
}
return strBackUrl;
}
相关文章推荐
- Java 获取当前页面完整的url
- Java中获取完整的url
- Java获取项目当前请求的全部URL,Java获取Referer,Java获取完整链接地址URL
- Java获取完整URL
- Java中获取完整的url
- Java中获取完整的url
- java根据url获取完整域名
- Java中获取完整的url
- jsp,java 获取完整的URL方法
- Java中获取完整的URL
- Java中获取完整的url
- java从request中获取当前访问是从哪个完整的url来的
- java 获取请求的完整url地址
- Java 获取当前页面完整的url
- Java中获取完整的url
- Java中获取完整的url
- Java中获取完整的url
- Java中获取完整的访问url
- Java中获取完整的url
- Java获取完整URL