-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,431
  • 20
  • 46
  • 65
  • *"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
  • 168,117
  • 40
  • 217
  • 433
Pradeep Pati
  • 5,779
  • 3
  • 29
  • 43