java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.aoapps.web.resources.servlet.PageServlet
com.aoapps.web.framework.WebPage
com.aoapps.web.framework.InputStreamPage
com.aoapps.web.framework.HtmlInputStreamPage
- All Implemented Interfaces:
Serializable,Servlet,ServletConfig
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:
-
Field Summary
Fields inherited from class com.aoapps.web.framework.WebPage
emptyWebPageArray, reHTMLPattern, SEARCH_TWO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamgetHtmlInputStream(Class<?> clazz) Gets the HTML file with the same name as the provided Class ornullwhen not found.Gets the file that the text should be read from.static <__ extends FlowContent<__>>
__printHtml(WebSiteRequest req, HttpServletResponse resp, WebPageLayout layout, ContentEE<?> content, __ contentLine, String htmlContent, String linkClass, AtomicReference<FlowContent<?>> lightAreaRef) Prints HTML content, parsing for special@tags.static <__ extends FlowContent<__>>
__printHtmlStream(WebSiteRequest req, HttpServletResponse resp, WebPageLayout layout, ContentEE<?> content, __ contentLine, InputStream in, String linkClass, AtomicReference<FlowContent<?>> lightAreaRef) Prints HTML with template substitutions.<__ extends FlowContent<__>>
__printStream(WebSiteRequest req, HttpServletResponse resp, WebPageLayout layout, ContentEE<?> content, __ contentLine, InputStream in) Stream input to servlet output.Methods inherited from class com.aoapps.web.framework.InputStreamPage
doGet, printStreamStaticMethods inherited from class com.aoapps.web.framework.WebPage
canAccess, configureResources, doGet, doGet, doGet, doPost, doPost, doPost, doPost, doPostWithSearch, equals, equals, generateUrlPath, getAuthor, getAuthorHref, getAutonli, getCachedChildren, getChildren, getClassLastModified, getContentValign, getCopyright, getDescription, getDoctype, getDocument, getHtmlOutputStream, getIndent, getJavascriptSrc, getKeywords, getLastModified, getLastModified, getLastModifiedRecursive, getLastModifiedRecursive, getNavImageAlt, getNavImageSuffix, getNavImageUrl, getNextPage, getOnloadScript, getPageIndexInParent, getParent, getPreferredContentWidth, getPreviousPage, getRedirectType, getRedirectUrl, getRootPage, getSearchLastModified, getSerialization, getServletContext, getShortTitle, getTitle, getUptime, getUrlParams, getUrlPath, getUrlPattern, getWebPage, getWebPage, getWebPage, getWebPage, getWebPage, getWebPage, getWebPageAndChildrenLastModified, getWebPageLayout, getWebSiteRequest, hashCode, includeNavImageAsParent, isHandler, isHandler, loadClass, printLoginForm, printUnauthorizedPage, search, service, setHeaders, showInLocationPath, standardSearch, useNavImage, useSiteMapMethods inherited from class com.aoapps.web.resources.servlet.PageServlet
serviceMethods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTraceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
HtmlInputStreamPage
public HtmlInputStreamPage()
-
-
Method Details
-
printStream
public <__ extends FlowContent<__>> __ printStream(WebSiteRequest req, HttpServletResponse resp, WebPageLayout layout, ContentEE<?> content, __ contentLine, InputStream in) throws ServletException, IOException Description copied from class:InputStreamPageStream input to servlet output.- Overrides:
printStreamin classInputStreamPage- Returns:
- The current
contentLine, which may have been replaced by a call toWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)orWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String). - Throws:
ServletExceptionIOException
-
getInputStream
Gets the file that the text should be read from.- Specified by:
getInputStreamin classInputStreamPage- Throws:
IOException
-
getHtmlInputStream
Gets the HTML file with the same name as the provided Class ornullwhen not found. -
printHtml
public static <__ extends FlowContent<__>> __ printHtml(WebSiteRequest req, HttpServletResponse resp, WebPageLayout layout, ContentEE<?> content, __ contentLine, String htmlContent, String linkClass, AtomicReference<FlowContent<?>> lightAreaRef) throws ServletException, IOException 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
WebPageLayout.startLightArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent) - @END_LIGHT_AREA Calls
WebPageLayout.endLightArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent) - @END_CONTENT_LINE Calls
WebPageLayout.endContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent) - @PRINT_CONTENT_HORIZONTAL_DIVIDER Calls
WebPageLayout.contentHorizontalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE) - @START_CONTENT_LINE Calls
WebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE) - @LINK_CLASS The preferred link class for this element
- Returns:
- The current
contentLine, which may have been replaced by a call toWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)orWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String). - Throws:
ServletExceptionIOException- See Also:
-
printHtmlStream
public static <__ extends FlowContent<__>> __ printHtmlStream(WebSiteRequest req, HttpServletResponse resp, WebPageLayout layout, ContentEE<?> content, __ contentLine, InputStream in, String linkClass, AtomicReference<FlowContent<?>> lightAreaRef) throws ServletException, IOException Prints HTML with template substitutions.- Returns:
- The current
contentLine, which may have been replaced by a call toWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)orWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String). - Throws:
ServletExceptionIOException- See Also:
-
