URL error loading embedded scripts
Reported by fiann | February 6th, 2009 @ 06:49 AM | in 1.0 Release
I was unable to load scripts embedded in the html file, due to an error in the way the URLs are resolved.
For example, running the tests with "make test-rhino" produces this error:
Setting internal window.document
Loading scripts.
loading both script :jquery.js
js: Couldn't open URL "file:/Users/fiann/Code/Javascript/thatcher-env-js/test/index.html/..//jquery.js: java.io.FileNotFoundException: /Users/fiann/Code/Javascript/thatcher-env-js/test/index.html/../jquery.js (Not a directory)".
This is using Java 1.5 on OS X. Possibly other versions of Java can deal with index.html not being a directory.
Comments and changes to this ticket
-
Thatcher February 16th, 2009 @ 08:08 AM
- Tag set to env, load, location, relative, script, url
- Milestone set to 1.0 Release
- State changed from new to open
- Assigned user set to Thatcher
Thanks I know I had a sloppy url in there, and probably should have known it wouldnt work on all systems. I think you're right this should be corrected in env.location for the long run.
For now I'll apply this patch.
Thanks Fiann
-
Thatcher February 17th, 2009 @ 04:39 AM
- State changed from open to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.