final String value = request.getOptionalProperty("value");
final boolean isClear = request.getOptionalProperty("action", "set").equals("clear");
final String expiresString = request.getOptionalProperty("expires", "-1");
if (!isClear && value == null) {
throw new RequiredPropertyException("Property not set: " + value);
}
if (isClear) {
request.appendDebug("cookie: " + name + " (cleared)");
request.getContext().addCookie(name, null, 0);
} else {