如何可以得到回调的URL呢?

liyuncdc 2010-07-26 10:44:29
如何可以得到回调的URL呢?

thx thx
...全文
1051 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
loveyt 2010-07-27
  • 打赏
  • 举报
回复
request.getRequestURI();
dxhdxh2k 2010-07-27
  • 打赏
  • 举报
回复
mark
liyuncdc 2010-07-26
  • 打赏
  • 举报
回复
这就是一个方法的实现阿。。。用来得到反回的URL
sun0322 2010-07-26
  • 打赏
  • 举报
回复
是java。net下的东西?

你把代码全部贴一下,包括import

加上
sun0322 2010-07-26
  • 打赏
  • 举报
回复


url = new URL(urlStr);
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestMethod("POST");
connection.setUseCaches(false);
connection.connect();

DataOutputStream out = new DataOutputStream(connection.getOutputStream());
out.writeBytes(content);
out.flush();
out.close();

BufferedReader reader = new BufferedReader(new InputStreamReader(connection
.getInputStream(), "utf-8"));
StringBuffer buffer = new StringBuffer();
String line = "";
while ((line = reader.readLine()) != null) {
buffer.append(line);
}
reader.close();

liyuncdc 2010-07-26
  • 打赏
  • 举报
回复
上面的代码用来运行一个URL, 这个URL可以反回到另外一个页面。 我的问题是:如何得到这一个反回的URL呢?

liyuncdc 2010-07-26
  • 打赏
  • 举报
回复
url = new URL(urlStr);
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestMethod("POST");
connection.setUseCaches(false);
connection.connect();

DataOutputStream out = new DataOutputStream(connection.getOutputStream());
out.writeBytes(content);
out.flush();
out.close();

BufferedReader reader = new BufferedReader(new InputStreamReader(connection
.getInputStream(), "utf-8"));
StringBuffer buffer = new StringBuffer();
String line = "";
while ((line = reader.readLine()) != null) {
buffer.append(line);
}
reader.close();
junjia 2010-07-26
  • 打赏
  • 举报
回复
能说明白点么
不是很理解你的意思
xiayuqijava 2010-07-26
  • 打赏
  • 举报
回复
不知道说的什么
sun0322 2010-07-26
  • 打赏
  • 举报
回复
[Quote=引用楼主 liyuncdc 的回复:]
如何可以得到回调的URL呢?

thx thx
[/Quote]

。。。

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧