/** * Initialization method setting the environment of the current resource * instance. It the calls the {@link #doInit()} method that can be * overridden. * * @param context * The current context. * @param request * The handled request. * @param response * The handled response. */ public void init(Context context, Request request, Response response) { this.context = context; this.request = request; this.response = response; try { doInit(); } catch (Throwable t) { doCatch(t); } }