This reference page contains some important information about configuring
the codebase setting of your applets.
- Keep Your CodeBase Setting Consistent
- The Recommended Directory Structure/CodeBase Setting
- Changing The Codebase Setting (Advanced User's Only)
1. Keep Your CodeBase Setting Consistent
The uTestTM Java Applets can be added to any of your web pages
via the standard HTML <APPLET> tags, as shown in Figure 1 below.
Figure 1 Example uTest Applet HTML
Note that on the very first line of the applet, a CODEBASE parameter
is used to specify the location of the applet's class file.
IMPORTANT!
In order for uTest to function properly, it is important that this CODEBASE setting has
the EXACT SAME VALUE for ALL of your test's applets. Codebase settings such as:
codebase="../classes/"
codebase="../classes"
(missing last /)
codebase="../Classes/"
(first C is capitalized)
...may be similiar and may actually refer to the same "classes" directory on your
server, but not all browsers will interpret these codebases as being the same. So
just make sure you use the EXACT same value for the codebase setting of all of your
applets.
2. The Recommended Directory Structure/CodeBase Setting
As specified in the uTest
TM User's Guide, because uTest
TM is
Java-based and because various browsers on various operating systems handle caching
Java Applets differently, there is a specific directory structure that should be
used in order to maximize browser compatibility. This recommended directory structure
is based on years of experience in dealing with Java and the various browser
differences and is illustrated in Figure 2 below.
Figure 2 Recommended Directory Structure
With this directory structure, all of the uTest
TM class files would go in
the "classes" directory and thus, you would use the setting
codebase="../classes/" for all of your test's applets.
Figure 3 Recommended Codebase Setting
3. Changing The Codebase Setting (Advanced User's Only)
On rare occasions, it may be necessary to use a codebase setting other than the
default
and recommended setting of
codebase="../classes/". One such
instance might be if you write a custom CGI script that accesses a database and
dynamically generates the test pages with the uTest
TM applets on them.
For that case, you would actually need to use the FULL URL of your "classes" directory
for the codebase of all of your applets. For example:
codebase="http://www.yourdomain.com/classes/"
This sort of setting is acceptable, however, you would also need to make a couple
other changes as listed below:
- Change The CodeBase In The "show" Files
In your "classes" directory, you will see approximately 14 HTML files that all begin
with the word "show"... such as "show_answer_sheet1.html", "show_answer_sheet2.html",
"show_email_page1.html"... and so on. You will need to open each of these files and
change the codebase setting of the "uTestJSI" applet on each page to be your
new codebase. Again there will be about 14 files that you have to make this change
to.
- Specify The "default_codebase" Parameter Of Your uTestFinishButton Applet
uTestTM maintains a global variable of the "codebase" setting for use
when it dynamically generates the answer sheet pages. This global variable
defaults to the recommended codebase="../classes/" setting, so if you change
the codebase you must change this global variable too. This can be done by adding
the following parameter to your uTestFinishButton applet:
<PARAM NAME="default_codebase" VALUE="http://www.yourdomain.com/classes/">
Where "http://www.yourdomain.com/classes/" is actually whatever new value you want to use
for the codebase.