|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.gee.publication.servlets.util.HttpServletUtil
public class HttpServletUtil
| Constructor Summary | |
|---|---|
HttpServletUtil()
|
|
| Method Summary | |
|---|---|
protected static HashMap |
_unpackMultipartFormData(javax.servlet.http.HttpServletRequest request)
Unpack multipart/form-data |
protected static HashMap |
_unpackQueryString(javax.servlet.http.HttpServletRequest request)
Unpack queryString, comparable to how a form is unpacked. |
protected static HashMap |
_unpackURLEncodedFormData(javax.servlet.http.HttpServletRequest request)
Unpack x-www-form-urlencoded |
static String |
checkFileExtension(String name)
A work-around for IE under certain conditons: File names come in corrupted as e.g.: ferrari.jpgggggg, mydocument.docccccc But note: hangman.class The correct extension is important for automatic type recognition. |
static String |
decompileQueryString(String query)
Decompiles a query-string. |
static void |
doEnd(javax.servlet.http.HttpServletRequest request,
String name)
|
static String |
doStart(javax.servlet.http.HttpServletRequest request,
String name)
Do some bookkeeping at the start of each doGet() or doPost(): - set the name of the thread - determine the name of the host |
protected static String |
findAttribute(String startPattern,
String endPattern,
byte[] sourceArray)
Finds an attribute's value in a byte-array. |
protected static int |
findIndexOf(byte[] toFind,
byte[] source,
int offset)
Finds the first occurrence of 'toFind' in 'source', starting at offset 'offset'. |
static String |
getFakeServerPath(String host)
Don't use this method, unless there is no way to use getServerPath. |
static String |
getParameter(javax.servlet.http.HttpServletRequest request,
String parameter)
Because IE's bug that substitutes §ion=... |
static String |
getServerPath(javax.servlet.http.HttpServletRequest request)
|
static String |
getServiceName(javax.servlet.http.HttpServletRequest request,
String defValue)
Get the component immediately following the current servlet path. |
static String |
gsub(String olds,
String news,
String text)
|
static boolean |
isEmpty(String string)
|
static boolean |
isFalse(String string)
|
static boolean |
isTrue(String string)
|
static void |
noCache(javax.servlet.http.HttpServletResponse response)
Netscape will even Cache POST's! We have to prevend this manually and carefully. |
static String |
normalizeHostname(String host)
Create a normalized hostname from the hostname. |
protected static byte[] |
trimReturns(byte[] source)
Remove one \n or \r\n (and combination thereof) from the beginning and end of the specified byte array. |
static HashMap |
unpackFormData(javax.servlet.http.HttpServletRequest request)
Unpack any type of form data |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpServletUtil()
| Method Detail |
|---|
public static String doStart(javax.servlet.http.HttpServletRequest request,
String name)
request - The request.name - The name of the thread
public static void doEnd(javax.servlet.http.HttpServletRequest request,
String name)
public static String normalizeHostname(String host)
public static String checkFileExtension(String name)
public static String decompileQueryString(String query)
public static HashMap unpackFormData(javax.servlet.http.HttpServletRequest request)
protected static HashMap _unpackURLEncodedFormData(javax.servlet.http.HttpServletRequest request)
protected static HashMap _unpackMultipartFormData(javax.servlet.http.HttpServletRequest request)
protected static int findIndexOf(byte[] toFind,
byte[] source,
int offset)
protected static String findAttribute(String startPattern,
String endPattern,
byte[] sourceArray)
protected static byte[] trimReturns(byte[] source)
public static boolean isEmpty(String string)
public static boolean isTrue(String string)
public static boolean isFalse(String string)
public static String gsub(String olds,
String news,
String text)
WLabel.gsub(java.lang.String, java.lang.String, java.lang.String)
public static String getParameter(javax.servlet.http.HttpServletRequest request,
String parameter)
protected static HashMap _unpackQueryString(javax.servlet.http.HttpServletRequest request)
public static void noCache(javax.servlet.http.HttpServletResponse response)
public static String getServiceName(javax.servlet.http.HttpServletRequest request,
String defValue)
request - the original requestdefValue - the default result value, in case request doesn't indicate onepublic static String getServerPath(javax.servlet.http.HttpServletRequest request)
public static String getFakeServerPath(String host)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||