⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nocontent.java

📁 webwork source
💻 JAVA
字号:
/* * WebWork, Web Application Framework * * Distributable under Apache license. * See terms of license at opensource.org */package webwork.action.standard;import javax.servlet.http.HttpServletResponse;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import webwork.action.Action;import webwork.action.ActionContext;/** *	Set the response status to 204 NO_CONTENT. * This tells the browser to not update the current page. * This can be useful if you have a form that you want to submit * but you do not want to reload the whole page just because of that. * You can then use some client side Javascript to notify the * user that the form was submitted. * *	@author Dick Zetterberg (dick@transitor.se) *	@version $Revision: 1.1 $ */public class NoContent implements Action{   protected static Log log = LogFactory.getLog(NoContent.class);   public String execute()   {      log.debug("NoContent action setting HTTP response to 204");      HttpServletResponse response = ActionContext.getResponse();      response.setStatus(HttpServletResponse.SC_NO_CONTENT);      // Return NONE so that no view is used by the dispatcher      return NONE;   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -