The following file is a typical web.xml file for INTGeoServer deployments.
The first 3 context parameters identify uniquely the version number of INTGeoServer. They are displayed in the serverinfo web service.
The WebappContextListener class is a generic class that does a lookup of all initializers defined in the layer.xml file. To add your own code to be executed at startup, you do not need to modify the web.xml file. Just implement the com.interactive.intgeoapi.server.lifecycle.AbstractIntGeoServerInitializer class and register it in your layer.xml file. For example, the initializer that sets the java.library.path property is plugged as follow:
<filesystem>
<folder name="com.interactive.intgeoapi.server.lifecycle.AbstractIntGeoServerInitializer">
<file name="com.interactive.intgeo.server.lifecycle.LibraryPathInitializer.instance">
<attr name="position" intvalue="10"/>
</file>
</folder>
</filesystem>
The JSONServlet class is the generic class that does a lookup for all request handlers defined in the layer.xml file. To add your own web service, you do not need to modify the web.xml file. Just implement the com.interactive.intgeoapi.server.requesthandlers.AbstractJSONServiceRequestHandler class and register it in your layer.xml file. For example, the request handler for the serverinfo web service is registered as follow:
<filesystem>
<folder name="com.interactive.intgeoapi.server.requesthandlers.AbstractJSONServiceRequestHandler">
<file name="com.interactive.intgeo.server.requesthandlers.ServerInfoRequestHandler.instance">
<attr name="position" intvalue="30"/>
</file>
</folder>
</filesystem>
The MaxPoolSize context parameter indicates the size of the file data pool. The default is 10. Setting the pool to 0 forces INTGeoServer to disable data pooling and instantiate each dataset each time a web service accesses it. The data pool is data type-agnostic: no data type takes precedence in the pool. If you need to modify the way the data pool is managed, you can unplug the default data pool, and plug your own. Your data pool class needs to be implement the com.interactive.intgeo.data.filesystem.IFileSystemDataObjectPool interface. The following layer.xml entry unplugs the default data pool and plugs your own:
<filesystem>
<folder name="com.interactive.intgeo.data.filesystem.IFileSystemDataObjectPool">
<file name="com.interactive.intgeo.data.filesystem.FileSystemDataObjectPool.instance_hidden" />
<file name="com.mycompany.intgeo.data.filesystem.FileSystemDataObjectPool.instance">
<attr name="position" intvalue="10"/>
</file>
</folder>
</filesystem>
The last lines are commented out by default. They can be used to enable performance logging.
INTGeoServer v3 uses a different web.xml.