com.aoindustries.website.framework
Class RedirectWebPage

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.aoindustries.website.framework.ErrorReportingServlet
              extended by com.aoindustries.website.framework.WebPage
                  extended by com.aoindustries.website.framework.RedirectWebPage
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class RedirectWebPage
extends WebPage

Redirects to the configured URL.

Author:
AO Industries, Inc.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.aoindustries.website.framework.WebPage
emptyWebPageArray, reHTMLPattern
 
Fields inherited from class com.aoindustries.website.framework.ErrorReportingServlet
BUFFER_SIZE
 
Constructor Summary
RedirectWebPage(LoggerAccessor logAccessor, javax.servlet.ServletContext context, WebPage parent, java.lang.String path, boolean useEncryption, java.lang.String description, java.lang.String keywords, java.lang.String navImageAlt, java.lang.String title)
          Performs a redirect.
 
Method Summary
 java.lang.String getDescription()
          Gets the description of this page.
 java.lang.String getKeywords()
          Gets the keywords for this page.
 java.lang.String getNavImageAlt(WebSiteRequest req)
          Gets the text for the navigation image to use to represent this page.
 WebPage getParent()
          Gets the parent of this page or null for none.
 java.lang.String getRedirectURL(WebSiteRequest req)
          Gets the URL to direct to.
 java.lang.String getTitle()
          Gets the title of the web page in order to generate the HTML.
 java.lang.String getURLPath()
          Gets the path of for the URL relative to the top of the site.
protected  WebSiteRequest getWebSiteRequest(javax.servlet.http.HttpServletRequest req)
          Gets the WebSiteRequest that handles authentication and other details of this site.
 boolean useEncryption()
          Determines if this page should be sent encrypted.
 
Methods inherited from class com.aoindustries.website.framework.WebPage
canAccess, doGet, doGet, doPost, doPost, doPostWithSearch, enforceEncryption, equals, equals, generateURLPath, getAdditionalHeaders, getAuthor, getCachedPages, getClassLastModified, getClassLoaderUptime, getContentVAlign, getCopyright, getHTMLChainWriter, getHTMLOutputStream, getJavaScriptSrc, getLastModified, getLastModifiedRecursive, getLastModifiedRecursive, getNavImageSuffix, getNavImageURL, getNextPage, getOnloadScript, getPageIndexInParent, getPreferredContentWidth, getPreviousPage, getRootPage, getSearchLastModified, getServletContext, getShortTitle, getURLParams, getURLPattern, getWebPage, getWebPage, getWebPage, getWebPage, getWebPageAndChildrenLastModified, getWebPageLayout, getWebPages, hashCode, includeNavImageAsParent, isHandler, isHandler, loadClass, printLoginForm, printUnauthorizedPage, reportingDoGet, reportingDoPost, reportingGetLastModified, search, showInLocationPath, standardSearch, useNavImage, useSiteMap
 
Methods inherited from class com.aoindustries.website.framework.ErrorReportingServlet
doGet, doPost, getGetCount, getLastModified, getLastModifiedCount, getLogger, getLogger, getLogger, getLoggerAccessor, getPostCount, getUptime, log, log
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletInfo, getServletName, init, init
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedirectWebPage

public RedirectWebPage(LoggerAccessor logAccessor,
                       javax.servlet.ServletContext context,
                       WebPage parent,
                       java.lang.String path,
                       boolean useEncryption,
                       java.lang.String description,
                       java.lang.String keywords,
                       java.lang.String navImageAlt,
                       java.lang.String title)
Performs a redirect.

Parameters:
path - the path relative to the top of the application, without a preceeding slash (/)
Method Detail

getWebSiteRequest

protected WebSiteRequest getWebSiteRequest(javax.servlet.http.HttpServletRequest req)
                                    throws java.io.IOException,
                                           java.sql.SQLException
Description copied from class: WebPage
Gets the WebSiteRequest that handles authentication and other details of this site.

Specified by:
getWebSiteRequest in class WebPage
Throws:
java.io.IOException
java.sql.SQLException

getParent

public WebPage getParent()
Description copied from class: WebPage
Gets the parent of this page or null for none.

Specified by:
getParent in class WebPage

useEncryption

public boolean useEncryption()
Description copied from class: WebPage
Determines if this page should be sent encrypted. By default, the encryption mode of the parent page is used.

Overrides:
useEncryption in class WebPage

getRedirectURL

public java.lang.String getRedirectURL(WebSiteRequest req)
                                throws java.io.IOException
Description copied from class: WebPage
Gets the URL to direct to. Redirection happens before specific frameset actions, thus allowing one to redirect various frames to different places.

Overrides:
getRedirectURL in class WebPage
Returns:
the relative or absolute URL to redirect to or null for no redirect.
Throws:
java.io.IOException

getURLPath

public java.lang.String getURLPath()
Description copied from class: WebPage
Gets the path of for the URL relative to the top of the site.

Overrides:
getURLPath in class WebPage

getDescription

public java.lang.String getDescription()
Description copied from class: WebPage
Gets the description of this page. By default, the description of the parent page is used.

Overrides:
getDescription in class WebPage

getKeywords

public java.lang.String getKeywords()
Description copied from class: WebPage
Gets the keywords for this page. By default, the keywords of the parent page are used.

Overrides:
getKeywords in class WebPage

getNavImageAlt

public java.lang.String getNavImageAlt(WebSiteRequest req)
Description copied from class: WebPage
Gets the text for the navigation image to use to represent this page. Defaults to getShortTitle.

Overrides:
getNavImageAlt in class WebPage
Returns:
the alt text of the navigation image
See Also:
WebPage.getShortTitle(), WebPage.getNavImageSuffix(com.aoindustries.website.framework.WebSiteRequest), WebPage.getNavImageURL(com.aoindustries.website.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, java.lang.Object)

getTitle

public java.lang.String getTitle()
Description copied from class: WebPage
Gets the title of the web page in order to generate the HTML. The title defaults to that of the parent page.

Overrides:
getTitle in class WebPage
Returns:
the page title