|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jbo.http.HttpUtil
Utilities for working with HTTP. NOTE: This source code copies the original implementation in the class : oracle.cabo.share.util.CaboHttpUtils. The reason for the copy is to avoid Cabo dependencies in the Core BC4J code.
Method Summary | |
static java.lang.String |
decodeRequestParameter(java.lang.String string,
java.lang.String encoding,
byte[] buffer)
Given a parameter string and the name of a character encoding, fixes the string. |
static java.util.Locale |
determineLocale(javax.servlet.ServletRequest request)
Returns the locale to be used for a request, based on Accept-Language and Accept-Charset HTTP
headers. |
static java.lang.String |
getFullServletPath(javax.servlet.http.HttpServletRequest httpRequest)
Returns the full servlet path: getRequestURI() - getPathInfo()
. |
static void |
setNoCacheHeaders(javax.servlet.http.HttpServletResponse response)
Sets headers on a servlet reponse to completely block caching for even the most poorly written browsers. |
static void |
validateEncoding(java.lang.String encoding)
Throws an UnsupportedEncodingException if the provided encoding is not supported. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String getFullServletPath(javax.servlet.http.HttpServletRequest httpRequest)
getRequestURI() - getPathInfo()
. In the Servlet 2.1 API, this is just getServletPath()
, but in Servlet 2.2, it's getContextPath() +
getServletPath()
, hence the need for a utility method that
works in both versions.
public static void setNoCacheHeaders(javax.servlet.http.HttpServletResponse response)
public static java.util.Locale determineLocale(javax.servlet.ServletRequest request)
Accept-Language
and Accept-Charset
HTTP
headers. Returns null if the locale cannot be determined.
public static void validateEncoding(java.lang.String encoding) throws java.io.UnsupportedEncodingException
encoding
- the name of a character encoding
java.io.UnsupportedEncodingException
public static final java.lang.String decodeRequestParameter(java.lang.String string, java.lang.String encoding, byte[] buffer) throws java.io.UnsupportedEncodingException
string
- the stringencoding
- the name of a character encodingbuffer
- an optional byte buffer, for reuse; pass null
if you're not calling this function repeatedly
java.io.UnsupportedEncodingException
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.