Results 1 to 3 of 3

Thread: HTTP Post

  1. #1
    mwr1976 is offline Senior Member
    Join Date
    Oct 2011
    Rep Power

    Default HTTP Post

    Forgive me if this is a stupid question. I have done a decent amount of web development(mainly .NET) I am somewhat new to Java. I have made my first "real" desktop application. Its in Swing. It constructs a URL with query string, based on a bunch of user input. Then it encodes the URL and query string. It all works fine. I currently have it set up where it displays the encoded URL in a JTextarea. Now I need to do an HTTP Post and return the response. I have done a bunch of searching for the last two days and haven't found the answer to a few questions.

    1. Can this be done without using Socket?
    2. If I use the correct class(s) will the app do the HTTP Post? or do I have to establish a connection? ( I am clueless on how to do this)
    3. Is there any good documentation, tutorials for an absolute beginner in this area? (besides the API tutorials)

    any help would be appreciated!!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: HTTP Post

    Moved from New to Java

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    On vacation
    Rep Power

    Default Re: HTTP Post

    You need to read about the HTTP protocol to understand how it works.
    If you don't want to use Sockets, there is a URLConnection and HttpURLConnection classes that can help.
    Do a Search on the forum for those classes for code samples.

Similar Threads

  1. http post
    By cino in forum Advanced Java
    Replies: 8
    Last Post: 06-13-2011, 04:08 PM
  2. HTTP POST over sockets
    By DC200 in forum Networking
    Replies: 2
    Last Post: 09-19-2010, 03:00 PM
  3. HTTP Post
    By erics44 in forum New To Java
    Replies: 0
    Last Post: 03-22-2010, 02:01 PM
  4. No location on http post
    By malandro95 in forum Advanced Java
    Replies: 2
    Last Post: 03-09-2010, 03:49 PM
  5. SOAP over HTTP/POST
    By sabatier in forum NetBeans
    Replies: 0
    Last Post: 07-10-2007, 08:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts