All Downloads are FREE. Search and download functionalities are using the official Maven repository.

goja.mvc.render.NotModified Maven / Gradle / Ivy

The newest version!
/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2013-2014 sagyf Yang. The Four Group.
 */

package goja.mvc.render;

import com.jfinal.render.Render;

import com.google.common.base.Strings;

import javax.servlet.http.HttpServletResponse;

/**
 * 

304 Not Modified.

* * @author sagyf yang * @version 1.0 2014-03-29 14:06 * @since JDK 1.6 */ public class NotModified extends Render { String etag; public NotModified() { this("NotModified"); } public NotModified(String etag) { this.etag = etag; } @Override public void render() { response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); if (!Strings.isNullOrEmpty(etag)) { response.setHeader("Etag", etag); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy