<?xml version='1.0' encoding='ISO-8859-1' ?> <!-- A configuration file for an imaginary HTTP server. --> <conf> <!-- Server administrator contact address. The value of this property can be retrieved with the XmlConfig.getProperty(String) method. --> <property name='server.administrator'>webmaster@domain.net</property> <!-- Configure a HttpServer object. The value of this property can be retrieved with the XmlConfig.get(String) method. --> <bean name='server' class='package.HttpServer'> <!-- Server port. The XmlConfig object calls HttpServer's setPort(int) method with the spesified value (80). --> <attr name='port' type='int'>80</attr> <!-- Number of threads. The XmlConfig object calls HttpServer's setThreads(int) method with the spesified value (16). --> <attr name='threads' type='int'>16</attr> <!-- Request handlers. If you want to access the beans in the list via the Xmlconfig object you can assign logical names for them using the name attribute. --> <list name='handler' class='package.Handler'> <!-- XML-RPC handler. --> <bean class='package.XmlRpcHandler'> <attr name='path' type='String'>/xml-rpc</attr> <list name='procedure' class='java.lang.Object'> <bean class='package.xmlrpc.SampleProcedures' /> </list> </bean> <!-- Default handler must be the last one in the list. --> <bean class='package.FileHandler'> <attr name='path' type='String'>/</attr> <attr name='root' type='String'>/home/httpd/html</attr> </bean> </list> </bean> <!-- Configure other objects. --> <!-- Start the HTTP server. This is an example of a late invocation. The XmlConfig class calls setTimeout(int) and start() methods of the object with the logical name 'server'. --> <bean name='server'> <!-- Request timeout. --> <attr name='timeout' type='int'>30</attr> <!-- Finally start the server. --> <call name='start'> </bean> </conf>