On Thu, Oct 2, 2008 at 4:26 PM, <[EMAIL PROTECTED]> wrote:
> Quoting Robert Hanson <[EMAIL PROTECTED]>:
>
> > Rolf,
> >
> > First, realize that it's an unusual situation that you are in, accessing
> > files through an absolute path on your web server. Most of us use
> relative
> > paths.
> >
> > This is not a bug. The problem is that that now that the signed applet
> can
> > read from the hard drive, if you just say:
> >
> > /xxx/xxx/xxx
> >
> > Jmol has to assume that's from the hard drive, because it doesn't have a
> URL
> > associated with it. (This was fixed recently for people on Macs and Unix
> > boxes, where there is no X: prefix.)
> >
> > Whether or not the applet is signed doesn't make a difference -- we
> really
> > don't want the signed and unsigned applet accessing different files. So
> you
> > can no longer use
> >
> > load "/xxx/xxx"
> >
> > with no HTTP:// in front of it with the applet -- signed or unsigned --
> to
> > access root files on the web server. I suppose you could argue that we
> > should allow "/" to mean "root on the web server" for the unsigned
> applet,
> > but that would mean that the signed applet and unsigned applet would have
> > two different interpretations, and I at least suggest that's not a good
> > idea.
> >
> > Jmol now has to read that as a local file. Instead, use your full URL
> call,
> > or set the default directory to
> >
> > http://[EMAIL PROTECTED]/
> >
> > and then just use the load command without the initial slash.
> >
> > Will that work for you?
> >
> Disabling server absolute paths is a severe change that at least
> should be announced very clearly. There might be other sites that will
> also be broken by this change. From the discussion about this topic on
> this list about 3 years ago (when the Jmol.js library popped up an
> alert when a server absolute path was used) I remember that there were
> also other people who voted for allowing server absolute paths.
>
[just a reminder -- that was a different situation, involving the JAR file]
>
> It is of course not always easy to maintain backward compatibility.
> But since the abilities of the signed applet are new features it might
> be better to disable server absolute paths by a switch instead of
> enabling them by a switch (or some other way) or disabling them totally.
>
> Q: What do others think about this?
> Q: Are there other Jmol sites that use server absolute paths?
[specifically in the LOAD command and without "http://" there.]
Rolf, you are right -- I forgot about the fact that some people might be
using "/" with an implicit "http:/" for a server root directory. Let's for
sure get this settled before 1.6 is released.
Question to Rolf: Are you concerned about specific static pages or
dynamically created content? Because if dynamic, is there any reason not to
just be explicit and use the full http://xxx.xxx.xxx/xxx designation for the
file when loading root server files?
Note that when you create the state, Jmol automatically adds that full
explicit path regardless of whether you had that in there or not originally.
To be very specific:
The (proposed) change recently introduced in the development version was to
have
load "/xxx/xxx"
for the application and applet (signed or not) default to
load "file:/xxx/xxx"
instead of the current
load "http://whatever.server/xxx/xxx"
when the applet is on a server or
load "file:/xxx/xxx"
when it is local.
Reason:
-- users of the signed applet, which reads local files, should be able to
use their standard notation for local files, not something prepended with
"file://" all the time.
-- users of the application or applet should not have to distinguish
between what they are using to designate the file
-- use of root server directories is rare, most likely with specialized
dynamic pages -- wikis and databases -- which can (perhaps?) easily be made
more explicit using default directory settings or explicit "http://"
protocol prefixes if that is what is intended. This is certainly forward
compatible, if not backward compatible. (ie, you can change it, and previous
versions will still work.)
-- common action for applet, signed applet, and application
Note that the dialog box for the signed applet -- when using the "LOAD
?.pdb" syntax -- always returns a local-based file reference, not one that
depends upon where the JAR file is located. In that case, clearly "/xxx/xxx"
refers to a local file. Always.
What Rolf is suggesting is that if the loaded file comes from a dialog, then
"/" must indicate a local file, but when it is just part of a script, then
"/" refers to the box that the JAR file resides on.
To me that seems oddly inconsistent.
BUT, I also understand the (former) logic that "if the JAR file is on the
server, then "/" should refer to that server, and if the JAR file is on a
local drive, then "/" should refer to the local drive.
Keep talking....
Bob
> Regards,
> Rolf
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users