Specifying an Applet's Input Parameters
You can specify an applet's input parameters in the applet's Java
Network Launch Protocol (JNLP) file or in the element of
the <applet> tag. It is usually better to specify the parameters in
the applet's JNLP file so that the parameters can be supplied
consistently even if the applet is deployed on multiple web pages. If
the applet's parameters will vary by web page, then you should specify
the parameters in the <parameter> element of the <applet> tag.
The example on that page shows two different ways to define the applet
parameters:
Consider an applet that takes three parameters. The paramStr and
paramInt parameters are specified in the applet's JNLP file,
applettakesparams.jnlp.
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="">
<!-- ... -->
<applet-desc
name="Applet Takes Params"
main-class="AppletTakesParams"
width="800"
height="50">
<param name="paramStr"
value="someString"/>
<param name="paramInt" value="22"/>
</applet-desc>
<!-- ... -->
</jnlp>
The paramOutsideJNLPFile parameter is specified in the parameters
variable passed to the Deployment Toolkit script's runApplet
function in AppletPage.html.
<html>
<head>
<title>Applet Takes Params</title>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<h1>Applet Takes Params</h1>
<script
src="https://www.java.com/js/deployJava.js"></script>
<script>
var attributes = { code:'AppletTakesParams.class',
archive:'applet_AppletWithParameters.jar',
width:800, height:50 };
var parameters = {jnlp_href: 'applettakesparams.jnlp',
paramOutsideJNLPFile: 'fooOutsideJNLP' };
deployJava.runApplet(attributes, parameters, '1.7');
</script>
</body>
</html>
Source Defining and Using Applet Parameters.