1.

What Is Codebase?

Answer»

The Java applets your browser executes reside in a file with the .class extension. When you create a Web page, you can STORE you Java .class files in a directory which is different from the directory that contains the page's HTML files. Within the HTML &LT;APPLET> tag, you can use the CODEBASE attribute to specify the directory within which the applet's .class files reside. The CODEBASE location can be a directory on the same COMPUTER or a directory at ANOTHER computer. The CODEBASE attribute specifies (to the browser) the base URL (relative or specifies) of the directory that contain the .class files. If an <APPLET> tag does not use the CODEBASE attribute, the browser uses the current directory (the one containing the HTML file) to locate the .class files. The following <APPLET> tag directs the browser to look for the applet files in the directory called /server_a/applets.

<APPLET CODE="MyFirst.class"CODEBASE^"/server_a/applets" WIDTH=300 HEIGHT=300>.</APPLET>

The Java applets your browser executes reside in a file with the .class extension. When you create a Web page, you can store you Java .class files in a directory which is different from the directory that contains the page's HTML files. Within the HTML <APPLET> tag, you can use the CODEBASE attribute to specify the directory within which the applet's .class files reside. The CODEBASE location can be a directory on the same computer or a directory at another computer. The CODEBASE attribute specifies (to the browser) the base URL (relative or specifies) of the directory that contain the .class files. If an <APPLET> tag does not use the CODEBASE attribute, the browser uses the current directory (the one containing the HTML file) to locate the .class files. The following <APPLET> tag directs the browser to look for the applet files in the directory called /server_a/applets.



Discussion

No Comment Found