Example usage for java.applet Applet getDocumentBase

List of usage examples for java.applet Applet getDocumentBase

Introduction

In this page you can find the example usage for java.applet Applet getDocumentBase.

Prototype

public URL getDocumentBase() 

Source Link

Document

Gets the URL of the document in which this applet is embedded.

Usage

From source file:gov.nih.nci.caintegrator.application.gpvisualizer.CaIntegratorRunVisualizer.java

/**
 * @param params/*w w  w.j a v a  2  s . c  o  m*/
 *            HashMap containing the following key/value pairs:
 *            CaIntegratorRunVisualizerConstants.NAME=name of visualizer task
 *            CaIntegratorRunVisualizerConstants.COMMAND_LINE=task command line (from
 *            TaskInfoAttributes) CaIntegratorRunVisualizerConstants.DEBUG=1 if debug
 *            output to stdout is desired (otherwise omit)
 *            CaIntegratorRunVisualizerConstants.OS=operating system choice from
 *            TaskInfoAttributes CaIntegratorRunVisualizerConstants.CPU_TYPE=CPU choice
 *            from TaskInfoAttributes
 *            CaIntegratorRunVisualizerConstants.LIBDIR=directory on server where the
 *            task lives CaIntegratorRunVisualizerConstants.DOWNLOAD_FILES=CSV list of
 *            parameter names which are URLs that need downloading by client
 *            prior to execution CaIntegratorRunVisualizerConstants.LSID=LSID of
 *            visualizer task PLUS all of the input parameters that the task
 *            requires (eg. input.filename, out.stub, etc.)
 *
 * @param supportFileNames
 *            array of names (without paths) of required support files for
 *            this task
 * @param supportFileDates
 *            array of lastModified entries (longs) corresponding to each
 *            support file
 *
 */
//  No change in this method for CaIntegrator
public CaIntegratorRunVisualizer(Map<String, String> params, String[] supportFileNames, long[] supportFileDates,
        Applet applet) {
    this.params = params;
    this.supportFileNames = supportFileNames;
    this.supportFileDates = supportFileDates;
    this.cookie = applet.getParameter("browserCookie");
    this.documentBase = applet.getDocumentBase();
    this.server = documentBase.getProtocol() + "://" + documentBase.getHost() + ":" + documentBase.getPort();
}