/** * This method does not actually send the response as it * does not have access to responseHandler but * just sets the status. The methodName is misleading * for historical reasons. */ public void sendError(int errorCode) throws IOException { setStatus(errorCode); }
public void addCookie(JDiscCookieWrapper cookie) { if(cookie != null) { List<Cookie> cookies = new ArrayList<>(); //Get current set of cookies first List<Cookie> c = getCookies(); if((c != null) && (! c.isEmpty())) { cookies.addAll(c); } cookies.add(cookie.getCookie()); setCookies(cookies); } }
public void setCookie(String name, String value) { Cookie cookie = new Cookie(name, value); setCookies(Arrays.asList(cookie)); }
public DiscFilterResponse(ServletOrJdiscHttpResponse parent) { this.parent = parent; this.untreatedHeaders = new HeaderFields(); parent.copyHeaders(untreatedHeaders); this.untreatedCookies = getCookies(); }