Wicket on Google’s App Engine

You’ll probably have noticed that Google’s App Engine now lets you run Java web apps. This includes those created with Apache Wicket, although you’ll need to tweak a couple of settings to make it play nicely.

The App Engine sandbox imposes some restrictions. The most notable of these is that you cannot run background threads. Here’s how to make Wicket play ball:

Make sure you’re running in deployment mode (this will disable the background thread that checks for modifications to your resource files, and is what you’ll want for deploying to a remote site like this anyway).

Override newSessionStore() in your WebApplication subclass and return a new HttpSessionStore(this). (The default DiskPageStore uses a background thread and writes files, neither of which are supported in the App Engine’s sandbox.)