API / Apache Wicket Interview questions
What is the purpose of the WicketApplication class?
The Application subclass (conventionally named something like WicketApplication, extending org.apache.wicket.protocol.http.WebApplication) is the single object that configures and bootstraps an entire Wicket app — the equivalent of a central startup and settings hub.
Its required override, getHomePage(), tells Wicket which Page class to render for the root URL. Beyond that, its init() method is where an application typically mounts bookmarkable page URLs, registers resource references, configures exception handling, wires in dependency injection (like Spring via SpringComponentInjector), and sets framework-wide behavior like whether pages default to stateful or stateless.
It's instantiated once per deployed application (not once per request), registered in web.xml or via servlet configuration alongside WicketFilter, and effectively lives for the whole lifetime of the running application.
More Related questions...