You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Gerdes, Tom" <TG...@OldRepublicTitle.com> on 2006/07/12 16:38:54 UTC
Httpclient running a JavaScript Function
I am using Jakarta-Commons Httpclient 3.0 to access a web page and
automate sending data from my database to a web site. Upon connecting
to the web site I receive a Javascript file as part of the response to
my GET method. Does Httpclient have a way to execute a function in the
Javascript file. I am trying to emulate the IE browser, and it has the
capability to run a Javascript function. If this is not a capability
of Httpclient 3.0, is there another java package that you can
recommend?
Re: Httpclient running a JavaScript Function
Posted by Ortwin Glück <od...@odi.ch>.
Tom,
HttpClient is not a browser. It is content agnostic actually. If you are
looking for a JavaScript engine you may want to check out Rhino.
However, I recommend you don't try to emulate a web browser and use a
WebServices API rather than an interface designed for humans.
Cheers
Ortwin
Gerdes, Tom wrote:
> I am using Jakarta-Commons Httpclient 3.0 to access a web page and
> automate sending data from my database to a web site. Upon connecting
> to the web site I receive a Javascript file as part of the response to
> my GET method. Does Httpclient have a way to execute a function in the
> Javascript file. I am trying to emulate the IE browser, and it has the
> capability to run a Javascript function. If this is not a capability
> of Httpclient 3.0, is there another java package that you can
> recommend?
>
>
--
[web] http://www.odi.ch/
[blog] http://www.odi.ch/weblog/
[pgp] key 0x81CF3416
finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
Re: Httpclient running a JavaScript Function
Posted by Roland Weber <ht...@dubioso.net>.
Hello Tom,
> Does Httpclient have a way to execute a function in the
> Javascript file. I am trying to emulate the IE browser, and it has the
> capability to run a Javascript function.
No. HttpClient is not a browser.
http://wiki.apache.org/jakarta-httpclient/ForAbsoluteBeginners#head-a110969063be34fcd964aeba55ae23bea12ac232
> If this is not a capability
> of Httpclient 3.0, is there another java package that you can
> recommend?
Most likely you're better off by re-programming the JavaScript
from that specific site in your application. Or you can try
scripting a browser engine or something like that. There are
free JavaScript interpreters in Java out there, but to simulate
a browser environment will be a hell of a task.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org