Does anyone have any ideas why .sb files won't run from our intranet server (Windows Server 2003 Standard Edition)?
When posting a Scratch file on my school's intranet server, clients see only the initial "Loading" page, but the scratch .sb file never loads or appears in any way. As per instructions I downloaded the two required files and put them in the same folder as the .sb file. I also created an .htm file and edited the code to reflect the filename of the .sb file. The client computers all have java, and are able to view .sb files on the scratch.mit.edu website with no problem.
I teach in an elementary school, and I hope to start an after school computer club in which students will create .sb programs, and we'll post them on our intranet site. The computer that runs the intranet server is right here in our school, and I have complete access to it as an Admin user.
Offline
Hi Rico,
Here are a couple things that helped someone else with a similar issue:
a. the applet and the project file must be on the same server (this a Java security restriction)
b. The Player prefixes the "value" field with the "codebase" field
So if you want your Scratch project files to live at:
http://www.yourwebsite.com/yourfoldername/yoursubfoldername
Make this be your "codebase" and put a copy of Player.jar in that directory. Then make the value be just the name of the project:
<applet
id="ProjectApplet"
style="display:block"
code="ScratchApplet"
codebase="/yourfoldername/yoursubfoldername/"
archive="ScratchApplet.jar"
height="387" width="482">
<param name="project" value="YourScratchProject.sb">
</applet></p>
If you open the Java console, you'll see an error message showing what path the Player is using to try to open the project. That should help you get the right codebase and project name.
Please let us know if this works!
Offline
Thank you very much. Either it didn't work, or I'm missing something. The files are indeed in the same folder. The contents of the folder are as follows:
hat.htm
hat.sb
ScratchApplet.jar
soundbank.gm
I have tried both the original "./" and "/foldername/" for the codebase. This is the entire text of the hat.htm file as it stands now, but I still see only the "Loading" page:
===============
<html>
<body>
<applet id="ProjectApplet" style="display:block" code="ScratchApplet" codebase="/scratch/" archive="ScratchApplet.jar" height="387" width="482">
<param name="project" value="hat.sb">
</applet>
</body>
</html>
===============
I don't have a file named "Player.jar" as mentioned in your instructions. Is that what I need?
Last edited by rico (2007-05-23 00:36:18)
Offline
Hi Rico,
Sorry to hear this is giving you problems. It looks like the java applet is loading correctly because you are seeing the big blue "Loading" bar in the Scratch Player (so the codebase is probably right).
It looks like the java player is having trouble accessing the hat.sb file.
Could you try to open http://(your intranet server address)/scratch/hat.sb in your browser? Since you mentioned you're using Windows Server, maybe your permissions aren't right for hat.sb. If you can't download hat.sb using the above URL, then this is the problem. Just give IUSR_SERVERNAME read access to hat.sb.
If you CAN download hat.sb using the above URL, then try to open up the Java console by right-clicking the coffee icon in the lower right hand corner of the screen (after running /scratch/hat.htm). Then, reload the page. the Java player should report where it is looking for hat.sb.
Let me know what works. I'm hoping it is just a permission problem (very common fix for me).
Nick
Offline
Thank you, Nick. Still no success. Here is an update...
The security properties of the hat.sb file do indeed include both Read and Read and Execute for ISUR_...
When pointing the bowser to hat.htm, I still see the loading page. I did not mention earlier, but the blue loading bar never turns blue; it remains a white box.
When pointing the browser to hat.sb, the client browser shows a 404 file not found error message although I am 100% certain the file is there. When connecting with ftp:// all files appear (including hat.sb).
The Java Console shows "Problem reading project from URL: http://(your intranet server address)/scratch/hat.sb openrul
I think you're on to something with the permissions idea. However, I do have other Java applets that have been working just fine for years. I'm not sure what to try next, but if you have any ideas, I would certainly appreciate any suggestions you offer.
Offline
I am running Windows Server 2003 Standard Edition, Service Pack 1. Should I install Service Pack 2?
I've been trying to research what exactly I need on the server, but I haven't found anything that seems to answer this.
Offline
rico:
ur problem because of ur IIS block the .sb files for security..
just add ''.sb'' filetype to ur IIS ''MIME types''.(in properties-->HTTP headers-->MIME types,or maybe u should ask ur administrator for some help)
so that u can run this applet from web server,try it....
I am from taiwan , sorry for poor english.
Last edited by ccysm (2008-01-08 21:26:51)
Offline
rico wrote:
Thank you very much. Either it didn't work, or I'm missing something. The files are indeed in the same folder. The contents of the folder are as follows:
hat.htm
hat.sb
ScratchApplet.jar
soundbank.gm
I have tried both the original "./" and "/foldername/" for the codebase. This is the entire text of the hat.htm file as it stands now, but I still see only the "Loading" page:
===============
<html>
<body>
<applet id="ProjectApplet" style="display:block" code="ScratchApplet" codebase="/scratch/" archive="ScratchApplet.jar" height="387" width="482">
<param name="project" value="hat.sb">
</applet>
</body>
</html>
===============
I don't have a file named "Player.jar" as mentioned in your instructions. Is that what I need?
you missed the l in .html
Offline