com.gitee.fufu669.utils.CacheResponseUtil Maven / Gradle / Ivy
package com.gitee.fufu669.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author wangfupeng
*/
public class CacheResponseUtil {
public static final Logger logger = LoggerFactory.getLogger(CacheResponseUtil.class);
public static void writeResponse(HttpServletResponse response, String result) {
try {
//直接将完整的表单html输出到页面
response.setContentType("text/html;charset=utf-8");
response.getWriter().write(result);
response.getWriter().flush();
} catch (IOException e) {
e.printStackTrace();
}
}
}