FileDocCategorySizeDatePackage
SSIConfig.javaAPI DocGlassfish v2 API3586Fri May 04 22:32:20 BST 2007org.apache.catalina.ssi

SSIConfig

public final class SSIConfig extends Object implements SSICommand
Implements the Server-side #exec command
author
Bip Thelin
author
Paul Speed
author
Dan Sandberg
author
David Becker
version
$Revision: 1.4 $, $Date: 2007/05/05 05:32:19 $

Fields Summary
Constructors Summary
Methods Summary
public longprocess(SSIMediator ssiMediator, java.lang.String commandName, java.lang.String[] paramNames, java.lang.String[] paramValues, java.io.PrintWriter writer)

see
SSICommand

        for (int i = 0; i < paramNames.length; i++) {
            String paramName = paramNames[i];
            String paramValue = paramValues[i];
            String substitutedValue = ssiMediator
                    .substituteVariables(paramValue);
            if (paramName.equalsIgnoreCase("errmsg")) {
                ssiMediator.setConfigErrMsg(substitutedValue);
            } else if (paramName.equalsIgnoreCase("sizefmt")) {
                ssiMediator.setConfigSizeFmt(substitutedValue);
            } else if (paramName.equalsIgnoreCase("timefmt")) {
                ssiMediator.setConfigTimeFmt(substitutedValue);
            } else {
                ssiMediator.log("#config--Invalid attribute: " + paramName);
                //We need to fetch this value each time, since it may change
                // during the
                // loop
                String configErrMsg = ssiMediator.getConfigErrMsg();
                writer.write(configErrMsg);
            }
        }
        // Setting config options doesn't really change the page
        return 0;