it.andynaz.utils
Class UtilsWEB

java.lang.Object
  extended by it.andynaz.utils.UtilsWEB

public abstract class UtilsWEB
extends Object

Useful methods for web applications.

Version:
2013/01/14
Author:
andynaz

Method Summary
static Integer getIntegerParameter(javax.servlet.http.HttpServletRequest req, String name)
          Takes a numeric parameter from an HTTP request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIntegerParameter

public static Integer getIntegerParameter(javax.servlet.http.HttpServletRequest req,
                                          String name)
Takes a numeric parameter from an HTTP request. If it is not possible (either because the parameter does not exist or the value is not integer) returns null.

Parameters:
req - HTTP request
name - parameter's name
Returns:
an Integer object with the value of the integer name parameter, or null
Throws:
NullPointerException - if req or name is null
IllegalArgumentException - if name has length==0


(c) 2013 andynaz - http://andynaz.altervista.org