...
With Wicket 1.5-RC6 will be available an extension of DiskDataStore that can be used to browse the content of the 'data' files created by DiskDataStore.
This debug enabled DiskDataStore is automatically setup when wicket-devutils.jar is in the classpath.
The debug information can be seen at http://host:port/context/wicket/internal/debug/diskDataStore
HttpSessionDataStore
In some environments like Google AppEngine it is not allowed to write to the file system and thus DiskDataStore cannot be used. In this case org.apache.wicket.pageStore.memory.HttpSessionDataStore can be used as replacement. This implementation of IDataStore is not persistent and puts all the data in the http session.
Wicket comes with 2 default eviction strategies to keep the size of the http session reasonable:
- org.apache.wicket.pageStore.memory.PageNumberEvictionStrategy - specifies how many pages can be hold
- org.apache.wicket.pageStore.memory.MemorySizeEvictionStrategy - specifies the maximum amount of memory for pages per http session.
To configure it:
Code Block | ||||
---|---|---|---|---|
| ||||
MyApp#init()
{
super.init();
setPageManagerProvider(new DefaultPageManagerProvider()
{
protected IDataStore newDataStore()
{
return new HttpSessionDataStore(pageManagerContext, new PageNumberEvictionStrategy(20));
}
}
}
|
PageExpiredException
org.apache.wicket.protocol.http.PageExpiredException may be thrown by PageProvider when none of the underlying storages can find a page with specific id.
The reasons could be:
...