andyLib v0.9

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/09/17
Author:
andynaz

Constructor Summary
private UtilsWEB()
           
 
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
 

Constructor Detail

UtilsWEB

private UtilsWEB()
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

andyLib v0.9

© 2013 andynaz - http://andynaz.altervista.org