static void setContext( ServletContext servletContext, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, RequestWrapper request, ResponseWrapper response) { BladeWebContext bladeWebContext = new BladeWebContext(); bladeWebContext.context = servletContext; bladeWebContext.httpServletRequest = httpServletRequest; bladeWebContext.httpServletResponse = httpServletResponse; bladeWebContext.request = request.getDelegate(); bladeWebContext.response = response.getDelegate(); BLADE_WEB_CONTEXT.set(bladeWebContext); }
public static HttpServletRequest servletRequest() { return BladeWebContext.me().httpServletRequest; }
public static HttpServletResponse servletResponse() { return BladeWebContext.me().httpServletResponse; }
public static ServletContext servletContext() { return BladeWebContext.me().context; }
public static Response response() { return BladeWebContext.me().response; }
public static Request request() { return BladeWebContext.me().request; }