September 2005
Beginner
576 pages
13h 6m
English
You have to do something in your Java program to retrieve the parameters on the web page or they will be ignored. The getParameter() method of the JApplet class retrieves a parameter from a param tag on a web page. The parameter name, which is specified with the name attribute on the page, is used as an argument to getParameter(). The following is an example of getParameter() in action:
String display1 = getParameter("headline1");
The getParameter() method returns all parameters as strings, so you have to convert them to other types as needed. If you want to use a parameter as an integer, you could use statements such as the following:
int speed; String speedParam = getParameter("speed"); if (speedParam != ...Read now
Unlock full access