|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.pow2.util.ServletUtil
Servlet Utility class
| Constructor Summary | |
ServletUtil()
|
|
| Method Summary | |
static String |
buildQueryString(HttpServletRequest request,
String[] args)
Build a query string using the (parameter, value) couples retrieved from the input request object. |
static String |
dumpRequest(HttpServletRequest req)
Dumps all the incoming HttpServletRequest informations. |
static String |
getBase(HttpServletRequest req)
Get the String representation of the HTTP URL for the input servlet. |
static String |
getContent(HttpServletRequest req,
String path)
Get the content of the file retrieved from the input path. |
static String |
getRequestAttribute(HttpServletRequest req,
String attribute)
Get the input request parameter or attribute string value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ServletUtil()
| Method Detail |
public static String buildQueryString(HttpServletRequest request,
String[] args)
request object.
request - the HttpServletRequest objectargs - the String array containing the name of the request
parameters to retrieve
public static String dumpRequest(HttpServletRequest req)
req - the input HttpServletRequest object to dump
public static String getBase(HttpServletRequest req)
throws Exception
req - the HttpServletRequest object.
Exception - if the URL conversion fails.
public static String getContent(HttpServletRequest req,
String path)
throws Exception
req - the HttpServletRequest objectpath - the path of the resource file to read
Exception - if any error occurs
public static String getRequestAttribute(HttpServletRequest req,
String attribute)
req - the HttpServletRequest objectattribute - the attribute to retrieve from the request object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||