• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

HTML form created by Java

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have posted about this project a couple of days ago. I am a beginner with Java a need to do a project that needs to connect to a web site, post a HTML form to a URL, and get back some information.
If the documentation tells you that a HTML form needs to be sent up and the only way I can do this is to create the HTML form created by Java. Will the web server that is requesting the HTML form be able to process the Java created HTML form the same way. I am not quite sure how the process is handled.
Sandy
 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's a link that will give you a good background on HTTP.
http://www.jmarshall.com/easy/http/
Also, you will need to know which parameters (ie parameter names) that the service you will be calling expects (Is there an existing HTML form page setup?, if so then you can just look at the HTML source to see which parameters are required).
Here is some code which can form a outline of what you will be doing:

Currently this code does a HTTP GET request (you will understand this after reading the above link) to http://www.google.com, and then reads back the HTTP response from google's webserver, ie the HTML that makes up googles default search interface.
Also, commented out in the code, is an example on how to do an HTTP POST as well.
Anway, I think that covers most of what you need to achieve for your project.
Good luck.
 
Sandy Schneider
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks James,
I can't begin to tell you how much I appreciate this information.
Sandy
 
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic