class VelocityStyleTilesTool extends ContextHolder {

    public Renderable renderAttributeContext() {
        return new AbstractDefaultToStringRenderable(getVelocityContext(),
                null, getResponse(), getRequest()) {

            public boolean render(InternalContextAdapter context, Writer writer) {
                Request velocityRequest = createVelocityRequest(
                        getServletContext(), writer);
                TilesContainer container = TilesAccess
                        .getCurrentContainer(velocityRequest);
                container.renderContext(velocityRequest);
                return true;
            }

        };
    }

}