FileDocCategorySizeDatePackage
ConfigParamServlet.javaAPI DocExample1102Sat Mar 15 19:39:50 GMT 2003com.oreilly.javaxp.cactus.servlet

ConfigParamServlet

public class ConfigParamServlet extends HttpServlet
author
Brian M. Coyner $version $Id: ConfigParamServlet.java,v 1.4 2003/02/27 00:24:43 jepc Exp $

Fields Summary
public static final String
CONFIG_PARAM
public static final String
CONFIG_VALUE
Constructors Summary
Methods Summary
protected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)


         
               

        if (validateInitParameters()) {
            throw new UnavailableException("Missing configuration param");
        }

        // rest of servlet logic would go here...
    
protected booleanvalidateInitParameters()

        String initParam = getServletConfig().getInitParameter(CONFIG_PARAM);
        return CONFIG_VALUE.equals(initParam);