InMemProfiler includes a very simple Java API to allow programs which are using it to explicitly request that the instance data be reset or the current instance data be written out to file. This API can be seen here.
When InMemProfiler is being used in a webserver environment (e.g. Tomcat) this API can be used with the help of a couple of JSP files:
These files can be dropped onto any JSP enabled webserver.