Hi Nick,

the workaround is fine... but I would be interested to know if you've
tested with a recent snapshot of HtmlUnit.

Cheers,
Marc.

KNIGHT, Nick wrote:
> Hi Marc,
> 
> thanks for taking the time to respond. 
> 
> I don't believe a security issue as the file can be displayed by
> firefox/ie by simply taking the URL below (../maint/home.jsp) and 
> entering it into the address bar.  I am starting to believe that
> there are dojo things happening here!!
> 
> ------------------------------------------------------------------------
> UPDATE:
> 
> Part of my problem has bveen gaining access to back-end developers.
> Finally have spent an hour or so with Java developer and resolved the
> problem.
> 
> THE PROBLEM:
> 
> we have 4 "require" statements:
>                       
>                       dojo.require("emits.core.base");
>                       dojo.require("emits.core.environment");
>                       dojo.require("emits.core.dom");
>                       dojo.require("dijit.dijit");                    
>                       dojo.require("emits.Handle");
>                       
> in a web browser, the system runs fine and all dojo resources were found
> with the following code
> in coreInitCompressed.js
>                   
>                   dojo.registerModulePath("emits","../emits");
> 
> Unfortunately this creates relative paths that Dojo returns as "could
> not load" errors when
> running webtest even though the path names were valid.
> 
> eg
> JavaScript error loading page http://xxxxxx/emits/maint/home.jsp: Error:
> Could not load 'emits.core.base'; last tried '../emits/core/base.js'
> (http://xxxxx/emits/resources/dojo09/dojo/dojo.js#20)
> 
> 
> The webserver folder structure looks like this
>               
>                   emits
>                        resources
>                                 dojo09
>                                       dojox  (resources)
>                                       dijit  (resources)
>                                       emits  (resources)
> 
> THE SOLUTION:
> 
> Define each path under the dojo09 root so that coreInitCompressed.js
> changes to:
> 
> dojo.registerModulePath("emits","/emits/resources/dojo09/emits");
> dojo.registerModulePath("dijit","/emits/resources/dojo09/dijit");
> dojo.registerModulePath("dojox","/emits/resources/dojo09/dojox");
> 
> So far tetsing in a browser has not shown any issue.
> 
> The weird thing about this was that a 403 response is generated which
> makes it look like a security problem
> and I am not sure why this would be happening!!!
>  
> 
> Nick Knight |  Specialist IT Consultant
> Department of Industry & Resources  |  Information Services Branch 
> 100 Plain Street, East Perth, WA 6004  |  T +61 8 9222 3421  |  F +61 8
> 9222 3342 |  M +61 417 991 756
> [EMAIL PROTECTED]  |  www.doir.wa.gov.au  
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Marc Guillemot
> Sent: Friday, 2 May 2008 7:28 PM
> To: [email protected]
> Subject: Re: [Webtest] Webtest 2.6 r1700 - Error loading a dojo resource
> 
> Hi,
> 
> do you have some special security settings on your web server that could
> explain this 403 for a simple js file?
> 
> Just for information (because I don't think that it concerns your
> problem), improvements have been made since HtmlUnit-2.1 and now the
> Dojo 1.0.2 Concerning dojo, the dojo test suite passes in HtmlUnit like
> in Firefox (except the few tests with CSS 3 box-sizing if I correctly
> remember).
> 
> Cheers,
> Marc.
> --
> Blog: http://mguillem.wordpress.com
> 
> 
> KNIGHT, Nick wrote:
>> Hi All,
>>
>> I am getting 403 error loading a dojo JS page.
>> JavaScript error loading page
>>
> http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/emits/../../.
>> ./maint/home.jsp: Error: Could not load 'emits.core.base'; last tried
>> '../emits/core/base.js'
>>
> (http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/dojo/dojo.js
>> #20)
>>
>>
>> The returned page on a click step has the following code:
>>              <title>eMiTS Maintenance</title>
>>              <link rel="stylesheet" type="text/css"
>> href="../resources/css/release/maint_mainpage.css" media="screen" />
>>              <link rel="stylesheet" type="text/css"
>> href="../resources/css/release/maint_print.css" media="print" />
>>
>>              <script
>> src="../resources/dojo09/emits/milonic_src.js"></script>
>>              <script
>> src="../resources/dojo09/emits/mmenudom.js"></script>
>>              <script>var djConfig={parseOnLoad: true, isDebug:
>> false};</script>
>>              <script type="text/javascript"
>> src="/emits/resources/dojo09/dojo/dojo.js"></script>
>>              <script type="text/javascript"
>> src="/emits/resources/dojo09/emits/coreInitCompressed.js"></script>
>>              <script>
>>                      /*setup base environment*/
>>                      dojo.require("emits.core.base");
>>                      dojo.require("emits.core.environment");
>>                      dojo.require("emits.core.dom");
>>                      dojo.require("dijit.dijit");            
>>                      dojo.require("emits.Handle");
>>
>> etc.....
>>
>>
>> The specific call that is failing is:
>>
>>  dojo.require("emits.core.base").
>>
>>
>> I have the following config file:
>>
>>                              host="xxxxxxxx.doir.wa.gov.au"
>>                              protocol="http"
>>                              port="9080"
>>                              basepath="emits/resources/dojo09/emits"
>>
>> the problem is that the URL for "emits.core.base" gets constructed as:
>>
> http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/dojo/../emits
>> /core/base.js
>> which can be loaded in a browser or from RUN command but htmlunit is
>> giving me a 403
>> response.
>>
>> Received responses
>> 302 get
>>
> http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/emits/../../.
>> ./maint/home.jsp ()
>> 200 get http://xxxxxxxx.doir.wa.gov.au:9080/emits/login/login.do
>> (text/html)
>> 302 post
>> http://xxxxxxxx.doir.wa.gov.au:9080/emits/login/j_security_check ()
>> 200 get
>>
> http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/emits/../../.
>> ./maint/home.jsp (text/html)
>> 200 get
>>
> http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/emits/milonic
>> _src.js (application/x-javascript)
>> 200 get
>>
> http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/emits/mmenudo
>> m.js (application/x-javascript)
>> 200 get
>>
> http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/dojo/dojo.js
>> (application/x-javascript)
>> 200 get
>>
> http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/emits/coreIni
>> tCompressed.js (application/x-javascript)
>> 403 get
>>
> http://xxxxxxxx.doir.wa.gov.au:9080/emits/resources/dojo09/dojo/../emits
>> /core/base.js (text/html)
>>
>> Any ideas on how to fix this problem
>>
>> Nick
>>
>>
>>
>> "DISCLAIMER: This email, including any attachments, is intended only
> for use by the addressee(s) and may contain confidential and/or personal
> information and may also be the subject of legal privilege. If you are
> not the intended recipient, you must not disclose or use the information
> contained in it. In this case, please let me know by return email,
> delete the message permanently from your system and destroy any copies.
>> Before you take any action based upon advice and/or information
> contained in this email you should carefully consider the advice and
> information and consider obtaining relevant independent advice.
>> _______________________________________________
>> WebTest mailing list
>> [email protected]
>> http://lists.canoo.com/mailman/listinfo/webtest
>>
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to