Each BeanInfo has a single BeanDescriptor that is used to provide information about the Bean. The BeanDescriptor supports a list of named attributes that augment the standard Java Bean’s information. You set these using the BeanDescriptor’s setValue method. ATG servlet beans look for a paramDescriptors attribute that contains an array of atg.droplet.ParamDescriptor objects. Each of these ParamDescriptor objects defines one of the parameters of your servlet bean expects to be provided. It defines the following information:



Name of the parameter


Description of the parameter’s function.


The Java class describing the parameter. For oparam parameters, you should specify the class to be of type javax.servlet.Servlet because that is how oparam parameters are compiled and represented.


Whether or not this parameter is optional or required. Set this to true if the parameter is optional.


Whether this parameter is local. Set this to true if the parameter is accessed with getLocalParameter or serviceLocalParameterlocal.


If this paramDescriptor describes a parameter of type javax.servlet.Servlet—that is, an oparam parameter—list the ParamDescriptors that define which parameters are set by the servlet bean before it renders the oparam parameter. Otherwise, set this to null.


ParamDescriptor Example

For example, the following paramDescriptor describes a parameter named numItems. Its description is number of times to call output. It is described by the Integer class, is a required parameter, is not local, and is not an oparam parameter.

paramDescriptors[0] = new ParamDescriptor("numItems",
                      "number of times to call output", Integer.class,
                      false, false, null);