|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjodd.servlet.ServletUtil
Miscellaneous servlet utils.
Constructor Summary | |
ServletUtil()
|
Method Summary | |
static java.lang.String |
getAuthPassword(javax.servlet.http.HttpServletRequest request)
Decodes the "Authorization" header and retrieves the password from it. |
static java.lang.String |
getAuthUsername(javax.servlet.http.HttpServletRequest request)
Decodes the "Authorization" header and retrieves the user's name from it. |
static javax.servlet.http.Cookie |
getCookie(javax.servlet.http.HttpServletRequest request,
java.lang.String cookieName)
Returns cookie value from client. |
static java.util.HashMap |
getUrlParams(java.lang.String url)
Creates Map from the given URL String with all parameter/value pairs extracted from it. |
static boolean |
isRequestMultipart(javax.servlet.http.HttpServletRequest request)
Examines if request is a multipart. |
static java.lang.String |
makeUrlParams(java.util.Map map)
Iterates the map and creates parameters suffix string. |
static void |
requireAuthentication(javax.servlet.http.HttpServletResponse resp,
java.lang.String realm)
Sends correct headers to require basic authentication for the given realm. |
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 boolean isRequestMultipart(javax.servlet.http.HttpServletRequest request)
request
- http request
true
if request is multipart, otherwise false
public static java.lang.String getAuthUsername(javax.servlet.http.HttpServletRequest request)
request
-
public static java.lang.String getAuthPassword(javax.servlet.http.HttpServletRequest request)
request
- http request
public static void requireAuthentication(javax.servlet.http.HttpServletResponse resp, java.lang.String realm) throws java.io.IOException
resp
- realm
-
java.io.IOException
public static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest request, java.lang.String cookieName)
request
- requestcookieName
- name of the cookie
public static java.lang.String makeUrlParams(java.util.Map map)
map
-
public static java.util.HashMap getUrlParams(java.lang.String url)
url
- url
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |