Страница 1 из 1

Как получить url страницы, выделить какую либо часть url?

Добавлено: 30 сен 2013, 16:30
usmanahmedov04
Как получить url страницы, выделить какую либо часть url`а?

Re: Как получить url страницы, выделить какую либо часть url

Добавлено: 30 сен 2013, 16:33
usmanahmedov04
Пишу приложение клиент для ВК

Re: Как получить url страницы, выделить какую либо часть url

Добавлено: 30 сен 2013, 17:09
trew

Re: Как получить url страницы, выделить какую либо часть url

Добавлено: 01 окт 2013, 13:03
usmanahmedov04
не мне иммено часть нужна а не все

Re: Как получить url страницы, выделить какую либо часть url

Добавлено: 01 окт 2013, 13:27
Mikhail_dev
http://docs.oracle.com/javase/tutorial/ ... lInfo.html
[syntax=java5]
public class ParseURL {
public static void main(String[] args) throws Exception {

URL aURL = new URL("http://example.com:80/docs/books/tutorial"
+ "/index.html?name=networking#DOWNLOADING");

System.out.println("protocol = " + aURL.getProtocol());
System.out.println("authority = " + aURL.getAuthority());
System.out.println("host = " + aURL.getHost());
System.out.println("port = " + aURL.getPort());
System.out.println("path = " + aURL.getPath());
System.out.println("query = " + aURL.getQuery());
System.out.println("filename = " + aURL.getFile());
System.out.println("ref = " + aURL.getRef());
}
}[/syntax]
Here is the output displayed by the program:
protocol = http
authority = example.com:80
host = example.com
port = 80
path = /docs/books/tutorial/index.html
query = name=networking
filename = /docs/books/tutorial/index.html?name=networking
ref = DOWNLOADING