Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ParamUtil.java
Package: BBS_system_on_java.rar [view]
Upload User: toby834
Upload Date: 2013-10-21
Package Size: 2613k
Code Size: 1k
Category:
Jsp/Servlet
Development Platform:
Java
- // created on 2002-2-26 at 20:41
- package net.acai.util;
- /**
- * Title: 清清网络
- * Description:
- * Copyright: Copyright (c) 2002
- * Company: www.SuperSpace.com
- * @author: SuperSpace
- * @version 1.0
- */
- import javax.servlet.http.*;
- public class ParamUtil
- {
- public static String getString(HttpServletRequest request,String paramName)
- {
- String temp=request.getParameter(paramName);
- if(temp!=null&&!temp.equals(""))
- return temp;
- else
- return null;
- }
- public static String getString(HttpServletRequest request,String paramName,String defaultString){
- String temp=getString(request,paramName);
- if(temp==null)
- temp=defaultString;
- return temp;
- }
- public static int getInt(HttpServletRequest request,String paramName) throws NumberFormatException{
- return Integer.parseInt(getString(request,paramName));
- }
- public static int getInt(HttpServletRequest request,String paramName,int defaultInt){
- try{
- String temp=getString(request,paramName);
- if(temp==null)
- return defaultInt;
- else
- return Integer.parseInt(temp);
- }
- catch(NumberFormatException e){
- e.printStackTrace();
- return 0;
- }
- }
- }