com.aoindustries.website.framework
Class HTMLInputStreamPage
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.aoindustries.website.framework.ErrorReportingServlet
com.aoindustries.website.framework.WebPage
com.aoindustries.website.framework.InputStreamPage
com.aoindustries.website.framework.HTMLInputStreamPage
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public abstract class HTMLInputStreamPage
- extends InputStreamPage
Pulls the content from a file with the same name and location as the .class
and .java but with a .html extension. As the file is being
sent to the client, any href='@classname' URL is rewritten and
maintains the current WebSiteRequest parameters.
- Author:
- AO Industries, Inc.
- See Also:
- Serialized Form
|
Method Summary |
static java.io.InputStream |
getHTMLInputStream(java.lang.Class clazz)
Gets the HTML file with the same name as the provided Class. |
java.io.InputStream |
getInputStream()
Gets the file that the text should be read from. |
static void |
printHTML(com.aoindustries.io.ChainWriter out,
WebSiteRequest req,
javax.servlet.http.HttpServletResponse resp,
WebPageLayout layout,
java.lang.String html,
java.lang.String linkClass)
Prints HTML content, parsing for special @ tags. |
static void |
printHTMLStream(com.aoindustries.io.ChainWriter out,
WebSiteRequest req,
javax.servlet.http.HttpServletResponse resp,
WebPageLayout layout,
java.io.InputStream in,
java.lang.String linkClass)
|
void |
printStream(com.aoindustries.io.ChainWriter out,
WebSiteRequest req,
javax.servlet.http.HttpServletResponse resp,
java.io.InputStream in)
|
| Methods inherited from class com.aoindustries.website.framework.WebPage |
canAccess, doGet, doPost, doPost, doPostWithSearch, enforceEncryption, equals, equals, generateURLPath, getAdditionalHeaders, getAuthor, getCachedPages, getClassLastModified, getClassLoaderUptime, getContentVAlign, getCopyright, getDescription, getHTMLChainWriter, getHTMLOutputStream, getJavaScriptSrc, getKeywords, getLastModified, getLastModifiedRecursive, getLastModifiedRecursive, getNavImageAlt, getNavImageSuffix, getNavImageURL, getNextPage, getOnloadScript, getPageIndexInParent, getParent, getPreferredContentWidth, getPreviousPage, getRedirectURL, getRootPage, getSearchLastModified, getServletContext, getShortTitle, getTitle, getURLParams, getURLPath, getURLPattern, getWebPage, getWebPage, getWebPage, getWebPage, getWebPageAndChildrenLastModified, getWebPageLayout, getWebPages, getWebSiteRequest, hashCode, includeNavImageAsParent, isHandler, isHandler, loadClass, printLoginForm, printUnauthorizedPage, reportingDoGet, reportingDoPost, reportingGetLastModified, search, showInLocationPath, standardSearch, useEncryption, 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 |
HTMLInputStreamPage
public HTMLInputStreamPage(LoggerAccessor loggerAccessor)
HTMLInputStreamPage
public HTMLInputStreamPage(WebSiteRequest req)
HTMLInputStreamPage
public HTMLInputStreamPage(LoggerAccessor loggerAccessor,
java.lang.Object param)
printStream
public void printStream(com.aoindustries.io.ChainWriter out,
WebSiteRequest req,
javax.servlet.http.HttpServletResponse resp,
java.io.InputStream in)
throws java.io.IOException,
java.sql.SQLException
- Overrides:
printStream in class InputStreamPage
- Throws:
java.io.IOException
java.sql.SQLException
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Gets the file that the text should be read from.
- Specified by:
getInputStream in class InputStreamPage
- Throws:
java.io.IOException
getHTMLInputStream
public static java.io.InputStream getHTMLInputStream(java.lang.Class clazz)
throws java.io.IOException
- Gets the HTML file with the same name as the provided Class.
- Throws:
java.io.IOException
printHTML
public static void printHTML(com.aoindustries.io.ChainWriter out,
WebSiteRequest req,
javax.servlet.http.HttpServletResponse resp,
WebPageLayout layout,
java.lang.String html,
java.lang.String linkClass)
throws java.io.IOException,
java.sql.SQLException
- Prints HTML content, parsing for special
@ tags. Types of tags include:
- @URL(classname) Loads a WebPage of the given class and builds a URL to it
- @BEGIN_LIGHT_AREA Calls
layout.beginLightArea(ChainWriter)
- @END_LIGHT_AREA Calls
layout.endLightArea(ChainWriter)
- @END_CONTENT_LINE Calls
layout.endContentLine
- @PRINT_CONTENT_HORIZONTAL_DIVIDER Calls
layout.printContentHorizontalDivider
- @START_CONTENT_LINE Calls
layout.startContentLine
- @LINK_CLASS The preferred link class for this element
- Throws:
java.io.IOException
java.sql.SQLException
printHTMLStream
public static void printHTMLStream(com.aoindustries.io.ChainWriter out,
WebSiteRequest req,
javax.servlet.http.HttpServletResponse resp,
WebPageLayout layout,
java.io.InputStream in,
java.lang.String linkClass)
throws java.io.IOException,
java.sql.SQLException
- Throws:
java.io.IOException
java.sql.SQLException- See Also:
printHTML(com.aoindustries.io.ChainWriter, com.aoindustries.website.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoindustries.website.framework.WebPageLayout, java.lang.String, java.lang.String)