> Dear All, > > 1) I try to display molecules with the basic HTML page (below) on my > laptop, i. > e. _locally_; not on a server.
Running locally with an unsigned applet can frequently cause problems. > - When the CML file is in the Jmol directory the molecule display works > fine: [snip] > However, the display does _not_ work if "../000jmol-10.00.48/benzene.cml" > is not > a regular file, but a symbolic link to a file located somewhere else in > the file > system. WHY ? The unsigned applet has security restrictions. You are trying to access a file that does not lie underneath the applet itself. If you know what a symbolic link is then you are capable of running a web server locally. Set up the web server on your laptop and access it as http://localhost ... you will have fewer problems. > - When the CML file is NOT in the Jmol directory, but in the working > directory > for instance the molecule display DO NOT work. Why ? Applets are not designed to run locally. They are designed to work from web servers. An unsigned applet runs in a secure 'sandbox' to prevent malicious behavior. After all, the idea behind an applet is that you go to some unknown/untrusted web site and run a program on your local machine. To prevent security problems that program has very limited access. For example, an applet downloaded from a webserver cannot read or write anything to local file systems. If you run an applet locally, the security sandbox restricts you to accessing files that are in the same directory or in child subdirectories. > 2) Now, on a server, it seems that the location of the CML in the file > system > does not matter, i. e. it does not need to be located _IN_ the Jmol > directory. > > Where is the trick ? Correct. If you are pulling from a web server the security restriction is that the applet can only retrieve files (via URLs) from the web server that it came from. As long as the applet is pulling files from its home web server then it cannot harm the local system. Set up the web server on your local machine and build your Jmol web applications through there. It will eliminate this problem and will be much closer to the target deployment environment, making it easier to move to a web server. Miguel ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

