Custom servlets on the Gateway

That’s right - one more thing. Invariably your servlet will want access to the Context. Add a function like this:

private GatewayContext getContext() { GatewayContext context = (GatewayContext) getServletContext().getAttribute(GatewayContext.SERVLET_CONTEXT_KEY); return context; }