/ **
* Returns the value of the specified name in a string from the Request object.
*
Returns the default value if the object corresponding to the Name is empty.
* @Param Request HTTPSERVLETREQUEST REQUEST object
* @Param Name string Specify name
* @Param DefVal String Default
* @Return String
* /
Public String getParam (httpservletRequest Request, string name, string defval) {string param = request.getParameter (name); return (param! = null? param: defval);}
/ **
* Returns the value of the specified name from the Request object.
*
Returns the default value if the object corresponding to the Name is empty.
* @Param Request HTTPSERVLETREQUEST REQUEST object
* @Param Name string Specify name
* @Param Defval INT default value
* @Return Int
* /
public int getParam (HttpServletRequest request, String name, int defval) {String param = request.getParameter (name); int value = defval; if (param = null!) {try {value = Integer.parseInt (param);} catch Numberformatexception Ignore) {}} Return Value;
/ **
* Returns the value of the specified name in a string from the Session object.
*
Returns the default value if the object corresponding to the Name is empty.
* @Param session httpsession session object
* @Param Name string Specify name
* @Param DefVal String Default
* @Return String
* /
public String getSessionParam (HttpSession session, String name, String defval) {Object param = session.getAttribute (name); // session.getValue (name); return (param = null (String) param:!? defval);} / **
* Returns the value of the specified name in the session object.
*
Returns the default value if the object corresponding to the Name is empty.
* @Param session httpsession session object
* @Param Name string Specify name
* @Param Defval INT default value
* @Return Int
* /