This Sample is located at \Samples\ASP.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
This sample demonstrates how the ASP Java Component Framework can be used to easily access the built-in ASP objects. In the Accessing Built-In ASP Objects sample, the built-in ASP objects were accessed through the underlying COM interfaces. This sample, however, uses the higher-level, powerful framework interfaces and methods.
This sample’s component implements a single class, ExpirePage, which exposes one method, expireAtYearEnd. This method invokes the AspContext.getResponse method to gain access to the Response object. Response.setExpiresAbsolute is then used to set the absolute expiration date of the HTTP response to one year from the present date. A message, informing the client browser of the expiration setting, is sent using the Response.Write method.
See Using the ASP Samples for instructions on installing, running, and uninstalling this sample.
The main method of this class calculates the beginning of the next year by setting the page’s cache expiration date.
ExpirePage_test.aspThis file uses the framework to manipulate date and times.
This sample shows how to: