-2

Possible Duplicate:
How to send HTTP request in java?

I only have one servlet running on the Tomcat server side. Now I want to send a HTTP request to this servlet from a Swing application, and it's not an APPLET application (because I see some examples sending request from applet). How can I do this?

Community
  • 1
  • 1
Cacheing
  • 3,161
  • 17
  • 42
  • 63
  • *"I see some examples sending request from applet"* It is much the same when done from an applet, command-line application or servlet. Try using the applet based example and get back to us with a specific question if you run into trouble. – Andrew Thompson Oct 15 '12 at 03:32

1 Answers1

2

While you can open a direct socket connection and send the raw HTTP headers & content and receive a response back, I would urge you to take a look at HttpRequestBase.

Andrew Thompson
  • 163,965
  • 36
  • 203
  • 405
Pradeep Pati
  • 5,584
  • 2
  • 26
  • 41