> but trying it with google, or any other html form, it doesnt work.
>> but trying it with google, or any other html form, it doesnt work.
(Snip URL that leads..)
<http://www.rgagnon.com/javadetails/java-0399.html>
> ...Basically, you just have to look
> like a browser when you connect. It's not rocket science.
Huh! Another great example..
Wish I had thought to hunt around the
"Real's How-To" at the time.. :-)

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Andrew Thompson - 17 May 2004 07:42 GMT
C.K. wrote *actually* (but implied attribution to Mike)
>>> but trying it with google, or any other html form, it doesnt work.
(Mike Smith *replied*..)
> (Snip URL that leads..)
> <http://www.rgagnon.com/javadetails/java-0399.html>
Oops!
thank you for your answers. by querying a page with the url of the resulting
page, search parameters and their values it works
what i want is to simulate a html form submission from java, since some
query forms require the query to be executed by their 'original' query form.
what i found doesn't seem to work.
> > but trying it with google, or any other html form, it doesnt work.
>
[quoted text clipped - 6 lines]
>
> Mike
Andrew Thompson - 17 May 2004 09:14 GMT
Apparently re this thread..
<http://google.com/groups?th=c8303b0abcbc08fc>
Please do not change the subject line of a thread
or strat a new thread unless it is a different subject.
Even thenit is best to find the first at Google
groups and link to it.
Further comments to bottom..
> "Mike Smith" <mikesmithv@yahoo.com> schrieb im Newsbeitrag
(C.K.)
>>> but trying it with google, or any other html form, it doesnt work.
..
>> http://www.rgagnon.com/howto.html
>>
>> Under Java choose Networking, at the bottom of the list of code snippits is
>> one called: "Fetch a page from Google". Basically, you just have to look
>> like a browser when you connect. It's not rocket science.
<top-post corrected>
Please do not top-post either C., as
it breaks the thread of the ..thread.
<http://www.physci.org/codes/javafaq.jsp#netiquette>
> thank you for your answers. by querying a page with the url of the resulting
> page, search parameters and their values it works
>
> what i want is to simulate a html form submission from java, since some
> query forms require the query to be executed by their 'original' query form.
> what i found doesn't seem to work.
Now.. you may have to put a little more
effort and thought into your statements..
I have never seen an..
"DoesNotSeemToWorkException" ;-)
<http://www.physci.org/codes/javafaq.jsp#exact>
Also, you geve a great little (the best kind)
example whrn you 1st posted, could you show us
_exactly_ what you have now?
<http://www.physci.org/codes/sscce.jsp>
Also, I am not sure how much experience you have
with debuggin, but it seems this may be a better
group for the moment..
<http://www.physci.org/codes/javafaq.jsp#cljh>
HTH

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Chris Smith - 17 May 2004 15:36 GMT
> thank you for your answers. by querying a page with the url of the resulting
> page, search parameters and their values it works
>
> what i want is to simulate a html form submission from java, since some
> query forms require the query to be executed by their 'original' query form.
> what i found doesn't seem to work.
Unfortunately, you haven't said much that could give us a clue what
isn't working.
One guess is that in your original code sample, you specified the URL as
"http://www.google.com". That's wrong; you need to specify the URL that
the form should be submitting to, not the URL that produces the form to
begin with. In Google's case, that's "http://www.google.com/search".
If you don't know that for your specific form (and don't want to collect
it ahead of time for some reason), then you're left with the regrettable
task of making *two* HTTP requests... the first will return the form,
and you need to parse it looking for the 'action' attribute of the form
tag. After you've got that, you can then submit the real form request.
In the latter case, you might actually want to look into some unit
testing tools like Canoo WebTest, which are decent at letting you script
interaction with web sites.

Signature
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation