Applet
Applet programs are generated according to the 2-Tier-Model.
This means that any program can be executed via the Internet. For this purpose
the Ebus-2T-Server has to be started on the Internet server. The Applet
communicates as Client with the Ebus-2T-Server. The Ebus-2T-Server reads and
wirted the Index Files on the Internet server and provides the data for the
Client. CGI scripts or other are not necessary to save data on the Internet
server.
Applets are started in an Html file or a PHP
file.
For every applet the Ebus-J creates an Html
file <Programname>_Applet.html and two PHP files <Programname>_Applet.php
and <Programname>_Applet.php4.
<Programname>_Applet.php4 is for PHP4, <Programname>_Applet.php for
older PHP versions.
The name or the IP address of the server on
which the Ebus-2T-Server runs must be specified as a parameter in the Html
file. Ebus-J uses the server name that was specified under Generator Settings (F12)
in Ebus-J.
In the PHP file the IP address of the
Server and the Client are found automatically. The entry <PARAM
NAME="Server"
VALUE="<?=$_SERVER['SERVER_ADDR']?>"> needs to be
changed only if the Ebus-2T-Server does not run on the Server on which the
Applet is started. On the Internet Server the PHP file should always be
started; otherwise it may be possible that the Client can not be called if it
is behind a firewall.
<Programname>_Applet.jar is the Client program.
<Programname>_2T_Applet.jar is the program part that is started by the Ebus-2T-Server.
Applets are executed on the Client computer. Only
those access rights specified in the file java.policy apply to the
applet on the Client. The files java.policy can be found in the subdirectory
‘security’ of the JRE directory (e.g.
C:\Programs\Java\jre1.5.0_04\lib\security). Rights are by default not assigned.
If the Applet is to have all rights, the following entry has to be inserted in
the file java.policy:
grant { permission java.security.AllPermission;
};
Also with Applets the configuration parameters
of the program are saved in the file <Programname>_Client.jni. This,
however, requires that the respective access rights are entered in java.policy.
Otherwise the standard settings are used any time the Applet starts. The file
<Programname>_Client.jni is saved in the Home directory of the user (e.g.
C:\Documents and settings\<User>).
If the user wants to use a Router, the Router
must be set in a way that incoming requests of the Internet Server are
permissible and transferred to the Client, since Applet and Server program
communicate in both directions.