com.eshore.uas.system.Current Maven / Gradle / Ivy
package com.eshore.uas.system;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Current {
static ThreadLocal current = new ThreadLocal();
private HttpServletRequest request;
private HttpServletResponse response;
public static void set(HttpServletRequest req,HttpServletResponse resp) {
Current curr = new Current();
curr.request=req;
curr.response=resp;
current.set(curr);
}
public static Current get() {
return current.get();
}
public HttpServletResponse getResponse() {
return response;
}
public HttpServletRequest getRequest() {
return request;
}
}