|
Oracle® Globalization Development Kit Java API Reference 10g Release 1(10.1) B10971-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.i18n.servlet.ServletHelper
ServletHelper
is a delegate class that provides a bridge between Java servlets and globalization objects. All operations that involve Java servlets are performed using this class.
Method Summary | |
static oracle.i18n.servlet.ApplicationContext |
getApplicationContextInstance(HttpServletRequest request) Returns an ApplicationContext object associated with the HTTP request object |
static oracle.i18n.servlet.localesource.LocaleSource |
getLocaleSourceInstance(HttpServletRequest request) Returns a LocaleSource object associated with the HTTP request object |
static oracle.i18n.servlet.Localizer |
getLocalizerInstance(HttpServletRequest request) Returns a Localizer object derived from the HTTP request object |
static String |
rewriteURL(String baseURL, HttpServletRequest request) Rewrites a URL based on the rules specified in the application configuration file.This method is used to determine the URL where localized static contents exist. |
static String |
rewriteURL(String baseURL, String name, HttpServletRequest request) Rewrites a URL based on the rules specified in the application configuration file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static oracle.i18n.servlet.ApplicationContext getApplicationContextInstance(HttpServletRequest request)
ApplicationContext
object associated with the HTTP request objectrequest
- an HTTP request objectApplicationContext
objectIllegalArgumentException
- if ApplicationContext
cannot be instantiated.public static oracle.i18n.servlet.localesource.LocaleSource getLocaleSourceInstance(HttpServletRequest request)
LocaleSource
object associated with the HTTP request objectrequest
- an HTTP request objectpublic static oracle.i18n.servlet.Localizer getLocalizerInstance(HttpServletRequest request)
Localizer
object derived from the HTTP request objectrequest
- an HTTP request objectLocalizer
object.public static String rewriteURL(String baseURL, HttpServletRequest request)
baseURL
- a URL stringrequest
- an HTTP request objectrewriteURL(String, String, HttpServletRequest)
public static String rewriteURL(String baseURL, String name, HttpServletRequest request)
For example, if localized contents are supplied in /images/es/welcome.jpg
for Spanish and /images/ja/welcome.jpg
for Japanese locales, the baseURL
would be /images/welcome.jpg
, and the rule defined in the regular expression should be "(.*)/([^\/]+)$"
in order that the URL be replaced with the string "$1/$A/$2"
.
baseURL
- a URL stringname
- the name of rewrite URL rulerequest
- an HTTP request object
|
Oracle® Globalization Development Kit Java API Reference 10g Release 1(10.1) B10971-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |