Essential JavaSketchpad Folder Structure

Navigation:  Appendix > JavaSketchpad and Web-Based Dynamic Geometry >

Essential JavaSketchpad Folder Structure

Previous pageReturn to chapter overviewNext page

Two components work behind the scenes to provide a dynamic Sketchpad illustration in a web page. The HTML document contains information that describes the geometric construction to be visualized in a language that JavaSketchpad understands. The JavaSketchpad applet, jsp5.jar, provides the functionality that interprets this description, displays the figure in your visitors’ browsers, and lets them interact with it. You can have many HTML files containing different illustrations that all use the same applet, just as on your local computer you can have many sketch documents that can all be opened by the same copy of Sketchpad.

When you save a web page containing a construction, Sketchpad actually saves two documents. The first is an HTML document describing your construction, and the second is a copy of the applet (jsp5.jar), enabling your browser to display the construction embedded in the HTML document.

If you later move the HTML document to a different location (for instance, to place it on a web server), you must also copy the jsp5.jar applet to the same location. By default, web browsers assume that jsp5.jar is located in the same place as your HTML file. Therefore, they’ll only work if you keep a copy of jsp5.jar in the same folder as the HTML document.

Experts: If you don’t want to store your HTML files in the same folder as the applet, specify a relative URL from the HTML file’s base directory to the applet by modifying the <CODEBASE> parameter in your HTML file. See your HTML reference manual for more details.

For example, in the following illustration, the Triangle.htm web page has been stored in a folder (in this case, named Web Folder), and Sketchpad has automatically put a copy of jsp5.jar in the same folder. This is the correct relationship between the web page (Triangle.htm) and the applet (jsp5.jar).

Proper folder structure (Windows and Macintosh)