Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

This page may be outdated! Please use the reference guide

Wicket 1.5 - Page storage

Table of Contents
minLevel3

Introduction

This page describes the internals of Wicket page storages in version 1.5.

...

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:

...

To configure it:

Code Block
borderStylesolid
titleMyApp.java
borderStylesolid

MyApp#init()
{
   super.init();

   setPageManagerProvider(new DefaultPageManagerProvider() 
   {
       protected IDataStore newDataStore() 
       { 
           return  new HttpSessionDataStore(pageManagerContext, new PageNumberEvictionStrategy(20));
       }
   }
}

...