FileDocCategorySizeDatePackage
TryCGI.javaAPI DocExample739Thu May 04 15:37:40 BST 2000None

TryCGI

public class TryCGI extends Applet implements ActionListener
Try running a CGI-BIN script from within Java.

Fields Summary
protected Button
goButton
Constructors Summary
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent evt)

		try {
			URL myNewURL = new URL("http://server/cgi-bin/credit");

			// debug...
			System.out.println("URL = " + myNewURL);

			// "And then a miracle occurs..."
			getAppletContext().showDocument(myNewURL);

		} catch (Exception err) {
			System.err.println("Error!\n" + err);
			showStatus("Error, look in Java Console for details!");
		}
	
public voidinit()

		add(goButton = new Button("Go for it!"));
		goButton.addActionListener(this);