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.)
- Enable session support in appengine-web.xml.
App Engine for Java is in limited beta, but if you’ve been to the London Wicket Users Group at Google and would like me to wangle an account for you, please e-mail me (details on the About page).