📄 requestutil.java
字号:
/* * RequestUtil.java * * Created on 2006年7月25日, 下午4:13 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package tot.util;import javax.servlet.*;import javax.servlet.http.*;/** * * @author Administrator */public class RequestUtil { /** Creates a new instance of RequestUtil */ public RequestUtil() { } //get int value public static int getInt(HttpServletRequest request,String parameter){ int tempInt=0; if(request.getParameter(parameter)!=null){ tempInt=Integer.parseInt(request.getParameter(parameter)); } return tempInt; } //get string value public static String getString(HttpServletRequest request,String parameter){ String tempString=null; if(request.getParameter(parameter)!=null){ tempString=request.getParameter(parameter); tempString=tempString.replace('\'', ' '); tempString=tempString.replaceAll("and",""); } return tempString; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -