|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.httpgw.HTTPRequest
wt.httpgw.HTTPServletRequest
Field Summary | |
private Properties |
cgiData
|
private static boolean |
DEBUG
|
private Properties |
formData
|
private Hashtable |
formDataMultivalue
|
private static boolean |
getRemoteHost
|
private static boolean |
pathInfoNeedsDecoding
|
private String |
queryString
|
private javax.servlet.http.HttpServletRequest |
servletRequest
|
private static boolean |
setServletSession
|
private static Vector |
setServletSessionFilters
|
Fields inherited from class wt.httpgw.HTTPRequest |
bizData, inputStream, response, serialVersionUID |
Constructor Summary | |
HTTPServletRequest(javax.servlet.http.HttpServletRequest request)
Constructor |
Method Summary | |
String |
getBaseURL()
Determine the Base URL of this script. |
String |
getEncoding()
Guess user agent's file encoding from request headers. |
static String |
getEscapedPathInfo(javax.servlet.http.HttpServletRequest httpServletRequest)
Get path info from servlet request, decoding it if indicated necessary by wt.httpgw.pathInfoNeedsDecoding and then escaping it for use as part of a URL again. |
Properties |
getFormData()
Retrieves the FORM data from the incoming input stream as x-www-form-urlencoded data. |
Properties |
getFormData(String encoding)
Retrieves the FORM data from the incoming input stream as x-www-form-urlencoded data. |
Hashtable |
getFormDataMultivalue()
Retrieves the FORM data from the incoming input stream as x-www-form-urlencoded data. |
Hashtable |
getFormDataMultivalue(String encoding)
Retrieves the FORM data from the incoming input stream as x-www-form-urlencoded data. |
String |
getFullURL()
Determine the Full URL of this script. |
String |
getMultiPartBoundary(String contentType)
Utility routine to parse out the multipart object-body boundary Supported API: false |
static String |
getPathInfo(javax.servlet.http.HttpServletRequest httpServletRequest)
Get path info from servlet request, decoding it if indicated necessary by wt.httpgw.pathInfoNeedsDecoding. |
String |
getProperty(String key)
Public getter method for access to CGI data. |
String |
getProperty(String key,
String default_value)
Public getter method for access to CGI data. |
Enumeration |
getPropertyKeys()
Public getter method for access to CGI data keys. |
String |
getQueryString()
Gets the URLs query string in decoded format. |
String |
getQueryString(String encoding)
Gets the URLs query string in decoded format. |
boolean |
isGetRequest()
Determine if the REQUEST_METHOD used to send the data from the browser was the GET method. |
boolean |
isPostRequest()
Determine if the REQUEST_METHOD used to send the data from the browser was the POST method. |
boolean |
isUrlencodedContent()
Determine if the CONTENT_TYPE used to send the data from the browser was urlencoded form data. |
void |
listProperties(PrintWriter out)
Public lister method for debug access to CGI data. |
static void |
loadCgiData(Properties cgi_data,
javax.servlet.http.HttpServletRequest req)
Gets the HTTP request header info from a HttpServletRequest object and loads it into a Properties object. |
PrintWriter |
newPrintWriter(OutputStream output_stream)
Utility routine to construct a buffered PrintWriter from an OutputStream. |
private static String |
parseMultiPartBoundary(String contentType)
|
void |
printFormDataHTML(PrintWriter out)
Print all of the form data using HTML. |
void |
printHTMLBottom(PrintWriter out)
Generate some vanilla HTML that you usually want to include at the bottom of any HTML page you generate. |
void |
printHTMLHeader(PrintWriter out)
Print a standard HTTP HTML header. |
void |
printHTMLTop(PrintWriter out,
String title)
Generate some vanilla HTML that you usually want to include at the top of any HTML page you generate. |
void |
printPropertiesHTML(PrintWriter out)
Print all of the CGI properties and the associated values using HTML. |
private String |
readQueryString()
Reads the query string from the incoming input stream. |
void |
setFormData(Properties p)
Sets the FORM data from a saved session. |
void |
setProperty(String key,
String value)
Public setter method for CGI data. |
Properties |
splitQueryString()
Splits the URLs query string into name value pairs based on the ampersand and equal character tokens. |
Hashtable |
splitQueryStringMultivalue()
Splits the URLs query string into name value pairs based on the ampersand and equal character tokens. |
Methods inherited from class wt.httpgw.HTTPRequest |
splitQueryString, splitQueryString, splitQueryStringMultivalue, splitQueryStringMultivalue, urlDecode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Properties formData
private Hashtable formDataMultivalue
private javax.servlet.http.HttpServletRequest servletRequest
private String queryString
private Properties cgiData
private static boolean DEBUG
private static boolean getRemoteHost
private static boolean setServletSession
private static boolean pathInfoNeedsDecoding
private static Vector setServletSessionFilters
Constructor Detail |
public HTTPServletRequest(javax.servlet.http.HttpServletRequest request) throws WTIOException
request
- HttpServletRequest from javax.servlet.httpMethod Detail |
public static final String getPathInfo(javax.servlet.http.HttpServletRequest httpServletRequest)
public static final String getEscapedPathInfo(javax.servlet.http.HttpServletRequest httpServletRequest)
public static void loadCgiData(Properties cgi_data, javax.servlet.http.HttpServletRequest req)
cgi_data
- Properties object to loadreq
- the request object to load fromprivate String readQueryString()
public Properties getFormData()
getEncoding
.
getFormData
in class HTTPRequest
public Properties getFormData(String encoding)
getFormData
in class HTTPRequest
public Hashtable getFormDataMultivalue()
getEncoding
.
getFormDataMultivalue
in class HTTPRequest
public Hashtable getFormDataMultivalue(String encoding)
getFormDataMultivalue
in class HTTPRequest
public String getQueryString()
getQueryString
in class HTTPRequest
public String getQueryString(String encoding)
getQueryString
in class HTTPRequest
public Properties splitQueryString()
splitQueryString
in class HTTPRequest
public Hashtable splitQueryStringMultivalue()
splitQueryStringMultivalue
in class HTTPRequest
public boolean isGetRequest()
isGetRequest
in class HTTPRequest
public boolean isPostRequest()
isPostRequest
in class HTTPRequest
public boolean isUrlencodedContent()
isUrlencodedContent
in class HTTPRequest
public String getBaseURL()
getBaseURL
in class HTTPRequest
public String getFullURL()
getFullURL
in class HTTPRequest
public String getProperty(String key)
getProperty
in class HTTPRequest
public Enumeration getPropertyKeys()
getPropertyKeys
in class HTTPRequest
public void listProperties(PrintWriter out)
listProperties
in class HTTPRequest
public String getProperty(String key, String default_value)
getProperty
in class HTTPRequest
public void setProperty(String key, String value)
setProperty
in class HTTPRequest
public String getEncoding()
wt.httpgw.encoding.xxx=yyy
where xxx
is
the lower case IANA encoding name and yyy
is the
Java encoding name. If no Accept-Charset header is present,
use template encoding rules to guess.
getEncoding
in class HTTPRequest
public void printHTMLHeader(PrintWriter out) throws IOException
printHTMLHeader
in class HTTPRequest
out
- PrintWriter to receive output.
IOException
public void printHTMLTop(PrintWriter out, String title) throws IOException
printHTMLTop
in class HTTPRequest
out
- PrintWriter to receive output.
IOException
public void printHTMLBottom(PrintWriter out) throws IOException
printHTMLBottom
in class HTTPRequest
out
- PrintWriter to receive output.
IOException
public void printPropertiesHTML(PrintWriter out) throws IOException
printPropertiesHTML
in class HTTPRequest
out
- PrintWriter to receive output.
IOException
public void printFormDataHTML(PrintWriter out) throws IOException
printFormDataHTML
in class HTTPRequest
out
- PrintWriter to receive output.
IOException
public PrintWriter newPrintWriter(OutputStream output_stream)
newPrintWriter
in class HTTPRequest
output_stream
- OutputStream to be wrapped
public String getMultiPartBoundary(String contentType)
getMultiPartBoundary
in class HTTPRequest
contentType
- String containing the content-type and boundary,
separated by a semi-colon
private static String parseMultiPartBoundary(String contentType)
public void setFormData(Properties p)
setFormData
in class HTTPRequest
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |