Forums Register Login

How to send a information to a form?

+Pie Number of slices to send: Send
I would like to know how I do in java to send to the form the params the values of "username" "password" "__login", for I can get connect?

I want to try to do a program in java, that I will run in the console, and it will connect and update my ip address. But I don't know how to send the params to a form.




Thank you.
+Pie Number of slices to send: Send
let me see if i got you correctly...
you want to have a console application that "simulates" a form submit ? (to update your dyndns ip ?

ok, there are several ways you can solve this:
URLConnection and its subclass HTTPUrlConnection (huc). the huc class supports some parts of the http protocol but is not very convenient if you want to do more complicate stuff (including redirection and so on).
there is a library from apache: jakarta http client
which can help you sending form data.

get/post and java

hope these pointers help you further...
+Pie Number of slices to send: Send
You understood what I need!

Thank you.
[ April 09, 2006: Message edited by: Frederico Benevides ]
knowledge is the difference between drudgery and strategic action -- tiny ad
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 821 times.
Similar Threads
Can't get RequestDispatcher forward() method or response.sendRedirect() to work
in which method shuld i use at the servlet code for request
forms authentication (j_security_check) with JSF
Can you post data from textfields to a URL without having a <form>
Portlet action URL
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:31:40.