Make a URL active from servlet

Hi,

I have a small problem to activate an HTTP URL from my Servlet.

This url is a link fior sending message so all what i want to do is to access it and activate it. I don磘 need to write or read anything from that server.

Any suggestions how to make it?

Thanks,

zizozine

[307 byte] By [zino80a] at [2007-10-2 18:41:45]
# 1
java.net.HttpURLConnection
BIJ001a at 2007-7-13 20:03:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hi BIJ001,

Thanks for the reply:)

I have this peace of code for that reason but it seems to be not working

URL url = new URL(send_message);

URLConnection con = (HttpURLConnection) url.openConnection();

con.setDoOutput(true);

con.connect();

Does it need something more?

Thanks,

zino80a at 2007-7-13 20:03:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Yes. You need to start reading the response to cause the request to be sent. You don't have to read the entire response, but you do have to at least start reading it.
DrClapa at 2007-7-13 20:03:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Hi DrClap,Thanks for the reply:)What did you mean exactly? Should i create an input stream and read via it, or?Thanks
zino80a at 2007-7-13 20:03:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
> Hi DrClap,> > Thanks for the reply:)> > What did you mean exactly? Should i create an input> stream and read via it, or?Yes that's exactly what he meant.ram.
Madathil_Prasada at 2007-7-13 20:03:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
Thanks to all of you:)It磗 working now!
zino80a at 2007-7-13 20:03:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...