This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HTML form POST in java?  RSS feed

 
Lance Walker
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there any built in APIs which can handle this? I want to develop a simple application that can handle submitting data on online HTML forms using the POST method, but I haven't found anything that can do this so far, except for a few deprecated libraries. I figured this would be a common task, but haven't had much luck. Is this possible to do without overly bloated code?
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to POST a FROM using a standalone Java app, then this example might helps.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which libraries did you look at? I'd use jWebUnit (or HtmlUnit, on which it is based) for this; both are still being updated.

A simpler solution might use Java's built-in URLConnection class somewhat like this.
 
Lance Walker
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help. I'm going to give these a try. I'll report back if theres a problem.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!