oracle.cabo.servlet.util
Class RedirectUtils
java.lang.Object
|
+--oracle.cabo.servlet.util.RedirectUtils
- public class RedirectUtils
- extends java.lang.Object
Utilities for redirecting to an URL.
The AbstractPageBroker
class automatically registers a PageRenderer
for the special page name used here. Any implementation of PageBroker
that doesn't subclass from AbstractPageBroker
must register this renderer itself.
- See Also:
AbstractPageBroker
Field Summary |
static java.lang.String |
REDIRECT_URL_PAGE_NAME
Name of the Page that will automatically redirect to an URL. |
Method Summary |
static PageRenderer |
getPageRenderer()
Returns a page renderer that will send the redirect command to the browser. |
static Page |
getRedirectPage(BajaContext context, Page page)
Returns a page object that will redirect the browser to another Page. |
static Page |
getRedirectPage(BajaContext context, java.lang.String url)
Returns a page object that will redirect the browser to another URL. |
static Page |
getRedirectPage(java.lang.String url)
Deprecated. This method does not call HttpServletResponse.encodeRedirectUrl(), or encode the string to handle multibyte characters, and consequently is not NLS-compliant unless you are extremely careful. Use getRedirectPage(Page) or getRedirectPage(String, String) instead, both of which are safe. |
static Page |
getResponseCompletePage()
Return a Page that indicates the response is complete; no further action should or can be taken by UIX, and no additional output will be rendered. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REDIRECT_URL_PAGE_NAME
public static final java.lang.String REDIRECT_URL_PAGE_NAME
- Name of the Page that will automatically redirect to an URL.
getResponseCompletePage
public static Page getResponseCompletePage()
- Return a Page that indicates the response is complete; no further action should or can be taken by UIX, and no additional output will be rendered.
getRedirectPage
public static Page getRedirectPage(BajaContext context,
Page page)
- Returns a page object that will redirect the browser to another Page. It's generally sufficient in EventHandlers to simply return the desired page, but clients may sometimes wish to make the URLs "look right". This method does call HttpServletResponse.encodeRedirectUrl().
-
- Parameters:
context
- the BajaContext
page
- the UIX Servlet page to redirect to
getRedirectPage
public static Page getRedirectPage(BajaContext context,
java.lang.String url)
- Returns a page object that will redirect the browser to another URL. The URL will be encoded using HttpServletResponse.encodeRedirectUrl(), and encoded for multibyte characters.
-
- Parameters:
context
- the BajaContext
url
- the URL that the browser will redirect to.
getRedirectPage
public static Page getRedirectPage(java.lang.String url)
- Deprecated. This method does not call HttpServletResponse.encodeRedirectUrl(), or encode the string to handle multibyte characters, and consequently is not NLS-compliant unless you are extremely careful. Use getRedirectPage(Page) or getRedirectPage(String, String) instead, both of which are safe.
- Returns a page object that will redirect the browser to another URL.
-
- Parameters:
url
- the URL that the browser will redirect to.
getPageRenderer
public static PageRenderer getPageRenderer()
- Returns a page renderer that will send the redirect command to the browser.