Re: Ways of disabling download of external Javascript files when HttpUnitOptions.setScriptingEnabled(false)
Russell Gold <[email protected]>
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mar 10, 2006, at 5:10 AM, Richard Wooding wrote: > Hi, > > I have a requirement to prevent WebConversation of HTTP Unit from > downloading external javascript files. I'm running the web > conversation with HttpUnitOptions.setScriptingEnabled(false), so > the external .js is not being executed anyway. > > Because all the external .js files where on a seperate host I have > been able to disable them by doing the following in /etc/hosts: > > 0.0.0.0 javascript.hostname.com > > Is there a way I could do this in Java, or an extension point I > could modify in the HTTP Unit source code to achieve this. Use the DNS listener, which lets you specify a mapping for a host name to an IP address on a per-WebConversation basis. See WebClientTest.testDNSOverride for an example ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642