public final class DocumentationServlet
extends javax.servlet.http.HttpServlet
.tex files under
TEX_SOURCE_BASE_RESOURCE
web.xml.
The extra path info is mapped to a "resource path".
.tex file.
| Constructor and Description |
|---|
DocumentationServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected WebPageOutputOptions |
chooseBestBaseWebPageOutputOptions(javax.servlet.http.HttpServletRequest request)
Convenience method to choose the most appropriate base
WebPageOutputOptions
for the current UserAgent, using chooseBestWebPageType(HttpServletRequest)
to determine the underlying WebPageOutputOptions.WebPageType. |
protected WebPageOutputOptions.WebPageType |
chooseBestWebPageType(javax.servlet.http.HttpServletRequest request)
Convenience method which picks the most appropriate MathML-based
WebPageOutputOptions.WebPageType
for the current UserAgent, returning WebPageOutputOptions.WebPageType.PROCESSED_HTML
if the UserAgent does not appear to support MathML as this is the only sensible
option in that case. |
protected SerializationSpecifier |
createMathMLSourceSerializationOptions() |
protected SnuggleEngine |
createSnuggleEngine() |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
String |
ensureGetContextInitParam(String propertyName) |
protected InputStream |
ensureReadResource(String resourcePathInsideWebpp)
Helper that reads in a resource from the webapp hierarchy, throwing a
ServletException
if the resource could not be found. |
protected Element |
extractMathMLElement(NodeList resultNodeList,
boolean allowUpConversionOptionsElements)
Untangles the given
NodeList to find an expected single MathML element,
and possibly some whitespace and possibly any number of <c:upconversion-options/>
elements. |
protected Transformer |
getStylesheet(javax.servlet.http.HttpServletRequest request,
String classPathUri)
Compiles the XSLT stylesheet at the given location within the webapp,
using
ClassPathURIResolver to locate the stylesheet and anything it wants to import. |
protected StylesheetCache |
getStylesheetCache() |
protected StylesheetManager |
getStylesheetManager() |
void |
init() |
protected boolean |
isInternetExplorer(javax.servlet.http.HttpServletRequest request) |
protected boolean |
isMathMLCapable(javax.servlet.http.HttpServletRequest request) |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic String ensureGetContextInitParam(String propertyName) throws javax.servlet.ServletException
javax.servlet.ServletExceptionprotected InputStream ensureReadResource(String resourcePathInsideWebpp) throws javax.servlet.ServletException
ServletException
if the resource could not be found.resourcePathInsideWebpp - path of Resource to load, relative to base of webapp.InputStream, which will not be nulljavax.servlet.ServletExceptionprotected StylesheetManager getStylesheetManager()
protected StylesheetCache getStylesheetCache()
protected SnuggleEngine createSnuggleEngine()
protected Transformer getStylesheet(javax.servlet.http.HttpServletRequest request, String classPathUri) throws javax.servlet.ServletException
ClassPathURIResolver to locate the stylesheet and anything it wants to import.
It also sets some core parameters based on certain properties set for the webapp.
request - Request being processed (so we can pass the context path to the XSLT)classPathUri - location of XSLT to compile.Templates representing the compiled stylesheet.javax.servlet.ServletException - if XSLT could not be found or could not be compiled.protected SerializationSpecifier createMathMLSourceSerializationOptions()
protected WebPageOutputOptions.WebPageType chooseBestWebPageType(javax.servlet.http.HttpServletRequest request)
WebPageOutputOptions.WebPageType
for the current UserAgent, returning WebPageOutputOptions.WebPageType.PROCESSED_HTML
if the UserAgent does not appear to support MathML as this is the only sensible
option in that case.request - protected WebPageOutputOptions chooseBestBaseWebPageOutputOptions(javax.servlet.http.HttpServletRequest request)
WebPageOutputOptions
for the current UserAgent, using chooseBestWebPageType(HttpServletRequest)
to determine the underlying WebPageOutputOptions.WebPageType.request - protected boolean isMathMLCapable(javax.servlet.http.HttpServletRequest request)
protected boolean isInternetExplorer(javax.servlet.http.HttpServletRequest request)
Copyright © 2008–2026 The University of Edinburgh. All rights reserved.