I may be wrong, but I think that openConnection only creates the connection - it does not actually do a request. Try if a request is made if you call "connection.getInputStream()" just before you print CONNECTED.
Rob Prime wrote: Try if a request is made if you call "connection.getInputStream()" just before you print CONNECTED.
Wonderful Rob. Excellent ,It is working
Why people ignore me I replied the same thing, look at the very first reply.
Rob Prime wrote:Sure you can. A HTTP server or servlet container doesn't care where the requests come from (although the web pages may).
No, I want to say, Is it your servlet URL is correct, means If you can call it from browser, then we confirm about the problem in Java code and not in URL/server/servlet. I'm just making it sure
And second point about reference , really dosen't a make a sense, its my wild guess (after, he ignore what I recommended in first place )