Servlet definition in servlets.xml

The configuration/config/servlet/servlets.xml file contains definitions for Gosu servlets. You add definitions for your custom servlets to this file. You define a custom servlet in a <servlet> element.

The following attributes are available to the <servlet> element.

class
Required. The fully qualified name of the class that implements the servlet.
env
Optional. A comma-separated list of names of environments for which the servlet definition applies.
info-description
Optional. The description of the servlet.
info-path
Optional. Reserved for future use.
server
Optional. The server for which the servlet definition applies. The value of this attribute is either a server role preceded by the # character or a server ID.

The <servlet> element supports an optional <param> subelement for each configuration parameter. The names and values of the parameters appear when the InfoServlet servlet runs if the value of its ExposeDetails parameter is true. The following attributes are available to the <param> subelement.

name
Required. The name of the parameter.
value
Required. The value for the parameter that PolicyCenter uses at start up.
server
Optional. Specifies the server for which the parameter definition applies. The value of this attribute is either a server role preceded by the # character or a server ID.
env
Optional. A comma-separated list of names of environments for which the parameter definition applies.
The configuration/config/servlet/servlets.xml file contains the following servlet definition, which demonstrates many of these elements and attributes.
<servlet
  class= "com.guidewire.pl.system.servlet.InfoServlet"
  info-description="This servlet will dump the information about its state and its servlets it presents. If ExposeDetails it will also dump the parameters"
  info-path="info">
<param
  name="ExposeDetails"
  value="false"/>
<param
  env="detail"
  name="ExposeDetails"
  value="true"/>
<param
  name="ExposeInProduction"
  value="false"/>
</servlet>