code: private void configureExplicitResponse(Route route, String controllerLayout, RenderTemplateResponse resp) throws InstantiationException, IllegalAccessException {
              if(!Configuration.getDefaultLayout().equals(controllerLayout) && resp.hasDefaultLayout()){
                  resp.setLayout(controllerLayout);
              }
              if(resp.getContentType() == null){
                  resp.setContentType(route.getController().getContentType());
              }
              resp.setTemplateManager(Configuration.getTemplateManager());
      }
docs: response on current thread.