When the RenderingApplication object is created, it contains a Formats collection object as well as two named formats: the virtroot object and the classpath object. To configure these objects, you set the VirtualRoot property (to set the virtroot format) and FormsRoot property (to set the classpath format) as a part of RenderingApplication object configuration. It is good to make these settings right after the first LoadConfiguration command.
As formats in the formats collection of the RenderingApplication object, the virtroot object and the classpath object are global to the application.
The virtroot format functions like a symbol in a table in that it lets you provide a link that will resolve to the correct location of the current Web application. You can use virtroot as the substitution token %virtroot% in substitution patterns. For more information, see VirtualRoot Property (RenderingApplication Object).
In Microsoft Outlook Web Access, the VirtualRoot property is set during configuration of the RenderingApplication object, in the Application_OnStart procedure in global.asa:
bstrVirtRoot = "/exchange"
objRenderApp.VirtualRoot = bstrVirtRoot
The classpath format is used to create links to forms. If you use the classpath format without having set the FormsRoot property of the RenderingApplication object, classpath functions as a substitution token, returning the message class of the current object.
The classpath format object obtains a new value when you set the FormsRoot property. In Microsoft Outlook Web Access, this property is set during configuration of the RenderingApplication object, in the Application_OnStart procedure in global.asa:
bstrVirtRoot = "/exchange"
objRenderApp.FormsRoot = Server.MapPath(bstrVirtRoot) & "\usa\forms"
In this example, the Server.MapPath method expands the string bstrVirtRoot to the virtual root of /exchange, namely c:\exchsrvr\webdata. This FormsRoot call also performs the following actions:
Optionally, to store information about additional forms directories, you can add more patterns to the classpath format object. Because the classpath contains only the beginning of the path to the forms directories, it is best to place all forms under the same virtual root, such as /exchange.
For more information, see RenderUsing Property (Column Object) and FormsRoot Property (RenderingApplication Object).