http - hitting a URL using java -


possible duplicates:
how send http request in java?
how use java.net.urlconnection fire , handle http requests?

using java, how hit url?

for instance, opening of http://www.xyz.com/node1 in browser tell xyz.com node1 hit. in java program (which sends sms text 'node1' in example above embedded in url sms gateway server)

how achieve without opening browser or using servlet.

you can use httpurlconnection.

but using directly overkill if want load url in question. this guide shows how open url.

basically boils down to:

url url = new url("http://www.xyz.com/node1"); urlconnection conn = url.openconnection(); conn.connect(); //... 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -