difference between jres:/// and jres:/

1 view
Skip to first unread message

Stephen Bannasch

unread,
Feb 27, 2009, 4:23:42 PM2/27/09
to otrun...@googlegroups.com
What's the difference between jres references that start like this:

jres:///

and one that start just like this:

jres:/

examples from udl-friction-56.otml:

<OTJavascript local_id="change_page.js"
src="jres:///org/concord/otrunk/udl/scripts/change_page.js" />

<OTBlob
src="jres:/org/concord/smartgraph/scripts/smart_graph_range_response.rb"
/>

--
- Stephen Bannasch
Concord Consortium, http://www.concord.org

Sam Fentress

unread,
Feb 27, 2009, 5:01:47 PM2/27/09
to otrun...@googlegroups.com
OTrunk appears to re-write "jres:///" as "jres:/" when saving. I was surprised that this worked at all, since I had assumed that "jres://" specified the protocol and "/..." specified the location. However, it seems that Java treats one slash and three slashes in a url as the same thing. You can actually use "file:///" and "file:/" interchangeably in Java as well (though not "file://").

I'm not sure if this is logical from the url specification, or if it's just a Java oddity.

Sam

Seong Kim

unread,
Feb 27, 2009, 5:30:17 PM2/27/09
to otrunk-dev
Well, Mozilla treats "file://" and "file:" as the same, and "file:///"
and "file:/" the same.
The "http" scheme behaves similarly, too. I saw the full explanation
somewhere but can't seem to find it right now.

-Seong


On Feb 27, 5:01 pm, Sam Fentress <sfentr...@concord.org> wrote:
> OTrunk appears to re-write "jres:///" as "jres:/" when saving. I was surprised that this worked at all, since I had assumed that "jres://" specified the protocol and "/..." specified the location. However, it seems that Java treats one slash and three slashes in a url as the same thing. You can actually use"file:///"and"file:/"interchangeably in Java as well (though not"file://").
> I'm not sure if this is logical from the url specification, or if it's just a Java oddity.
> Samotr...@googlegroups.comwrote:What's the difference between jres references that start like this:  jres:///and one that start just like this:  jres:/examples from udl-friction-56.otml:<OTJavascript local_id="change_page.js"

Sam Fentress

unread,
Feb 27, 2009, 5:52:49 PM2/27/09
to otrun...@googlegroups.com
otrun...@googlegroups.com wrote:

Well, Mozilla treats "file://" and "file:" as the same, and "file:///"
and "file:/" the same.
The "http" scheme behaves similarly, too. I saw the full explanation
somewhere but can't seem to find it right now.

-Seong

Hey, Safari and IE too! You mean people have been typing "http://www.concord.com" all this time when they could have just been typing "http:www.concord.com"? Think of the hours of wasted productivity!
Reply all
Reply to author
Forward
0 new messages