This page last changed on Feb 27, 2009 by stepheneb.

If you start an authoring jnlp from an online page for an activity that is fetched from an online location and edit the activity content and save the otml locally some (all?) of the relative references to resources will be rewritten to be absolute references.

Here's an example:

Start at this page:

Under the column of links titled otml file is this link for the otml for spring2009_activity3: spring2009_activity3.otml.

Currently if you download this file and list the lines that have the string ''http://' you'll see 5 lines listed

$ grep -n 'http:\/\/' spring2009_activity3.otml
108:   <OTInclude href="" />
131:   <OTJavascript src="" />
2674:  <OTJavascript local_id="change_page.js" src="" />
2675:  <OTJavascript local_id="show_message.js" src="" />
2676:  <OTJavascript local_id="loops_authoring_script.js" src="" />

Here are the href attributes urls as a list:


If you run 'spring2009_activity3' from the learner jnlp link it will load the activity otml file from:

Java will set the codebase to the base url for this file:

If you were to copy just this otml file to your local computer and run it locally in it's current state:

it would also work because it has absolute url references to the Javascript resources and will load them from the web server.

If I changed the href attributes to relative references like this:


And check this change into subversion then when you run 'spring2009_activity3' from the server Java will recognize these are relative references, add the default codebase and load the resources from the web server.

For example when the Java application sees this href attribute:

  • href="scripts/student_script.js"

It will prefix the resource reference with to produce:

  • href=""

However if you download just the otml file and run it locally the resources will not be found.

However if I change the resource references to relative and you download the LOOPS/ directory from subversion:

svn checkout

and you now run the activity LOOPS/spring2009_activity3.otml from your local filesystem the resources will be located using relative references and the activity will work.

If however you author the local activity by first running the author jnlp link for spring2009_activity3 from this page:

Then use the File::Open command to load your local otml file, make changes, and save them the resource references will be re-written as absolute.

You need to run the start the jnlp locally in authoring mode and then when you author a local otml file with relative references these won't be re-written as absolute references.

If you download the otml file and run it locally the resources should now be found by the authoring view. This was only a problem with images embedded in documents.

Posted by scytacki at Jun 17, 2009 14:53
Document generated by Confluence on Jan 27, 2014 16:52