Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.sction.mvc.viewrender;
 
 
 
public class HtmlViewRender implements ViewRender {
	public void render(ServletContext servletContext,
			Object objString encodingController controllerAction actionthrows Exception {
		response.reset();
		response.setCharacterEncoding(encoding);
		PrintWriter out4 = response.getWriter();
		response.setContentType("text/html; charset="
encoding);
		response.setHeader("Cache-Control""no-cache"); // 取消浏览器缓存
		out4.print(obj);
		out4.flush();
		out4.close();
	}
New to GrepCode? Check out our FAQ X