Creating StorageItems

In This Guide

You create a storage item in the default storage location using StorageItem.Static.create(). (For details about declaring the default configuration, see Setting the default StorageItem configuration.)

StorageItem newStorageItem = StorageItem.Static.create();

In addition, you can specify a different storage location using StorageItem.Static.createIn("configurationKey").

StorageItem newStorageItem = StorageItem.Static.createIn("myStorageName");

In the previous snippet, Dari instantiates the storage item newStorageItem using the storage item configuration Key myStorageName defined in the Tomcat context.xml.

See also:

In This Guide