Creating the RenderingApplication Object

You can usually assume that a RenderingApplication object will at some point be useful for your application. Only rarely would it not; for example, you may want to view mail but your application does not deal exclusively with viewing mail; in this case you can create an ObjectRenderer or ContainerRenderer object when needed, using the Server.CreateObject method instead of using the RenderingApplication object. See About Standalone Renderer Objects.

But even in those rare cases, you may still choose to start by creating a RenderingApplication object. This is because it is faster to create child rendering objects from a RenderingApplication object than by using the Server.CreateObject method.

Therefore, because the Application_OnStart procedure in the global.asa file is automatically called by IIS, it is efficient to create the RenderingApplication object by placing the following call in that procedure.

CreateObject ("AMHTML.RenderingApp "virtroot" "classpath" ")

This call creates two other objects as well, the virtroot and classpath format objects. There is only one RenderingApplication object per virtual root, and therefore only one per application.