External Scripts & Images
Keith Kowalczykowski <[email protected]> Thu, 17 Sep 2009 20:17:40 -0700
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <C6D849E4.581EF%[email protected]> |
Hi,
I'm new to HttpUnit, and am running into an issue with using it on a page
that pulls in external resources (JS and Images). Here is a snippet from the
head of the page:
<script
src="http://ajax.googleapis.com/ajax/libs/dojo/1.3/dojo/dojo.xd.js"></script
>
<script src="/static/js/client-runtime.js"></script>
When HttpUnit goes to parse the first script tag, it fails because it seems
to assume that all URLs are relative to a base URL. ParsedHTML.java
constructs the get request for the script like this:
WebRequest req = new GetMethodWebRequest( getBaseURL(), srcAttribute );
Now this seems like a fairly common issue, so I'm wondering how people
usually handle it? Are there some special options I need to enable in order
to allow cross-domain resources?
Thanks in advance for your help.
-Keith
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf