TEX_SOURCE_BASE_RESOURCE
| Modifier and Type | Class and Description |
|---|---|
| private class | DocumentationServlet.
Implementation of |
| Modifier and Type | Field and Description |
|---|---|
| private File | baseDirectory
Directory in which Files created and cached by this servlet will be stored. |
| private boolean | caching
Whether to cache result or not |
| private static final String | CACHING_PARAM
init-param controlling whether we are caching or not |
| private final Map | extensionToContentTypeMap
Maps supported extensions to Content Types, for all extensions we support here |
| private final Map | extensionToWebPageTypeMap
Maps extension to |
| private static final String | FORMAT_OUTPUT_XSLT_URI
Location of XSLT for formatting the resulting web pages |
| pack-priv static final Logger | |
| private static final String | MACROS_RESOURCE_LOCATION
Location of macros TeX file (relative to webapp) |
| private static final long | |
| private static final String | TEX_SOURCE_BASE_RESOURCE
Base Location for .tex source files (relative to webapp) |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | doGet(HttpServletRequest request, HttpServletResponse response)
Overrides javax. Called by the server (via the |
| private File | Returns: resulting File, or null if the source TeX file for this resource couldn't be located or if the file extension couldn't be understood.Generates the documentation resource at the given path. |
| private File | generateSnuggledFile(final HttpServletRequest request, final InputStream texSourceStream, final String texSourceResourcePath, final WebPageOutputOptions.
References Deprecated
WebPageOutputOptions.WebPageType is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public void | init()
Overrides javax. A convenience method which can be overridden so that there's no need
to call |
| private File | mapResourcePath(final String resourcePath)
Maps a requested "resource path" to a file under our |
| baseDirectory | back to summary |
|---|---|
| private File baseDirectory Directory in which Files created and cached by this servlet will be stored. | |
| caching | back to summary |
|---|---|
| private boolean caching Whether to cache result or not | |
| CACHING_PARAM | back to summary |
|---|---|
| private static final String CACHING_PARAM init-param controlling whether we are caching or not | |
| extensionToContentTypeMap | back to summary |
|---|---|
| private final Map<String, String> extensionToContentTypeMap Maps supported extensions to Content Types, for all extensions we support here | |
| extensionToWebPageTypeMap | back to summary |
|---|---|
| private final Map<String, WebPageOutputOptions. Maps extension to | |
| FORMAT_OUTPUT_XSLT_URI | back to summary |
|---|---|
| private static final String FORMAT_OUTPUT_XSLT_URI Location of XSLT for formatting the resulting web pages | |
| logger | back to summary |
|---|---|
| pack-priv static final Logger logger | |
| MACROS_RESOURCE_LOCATION | back to summary |
|---|---|
| private static final String MACROS_RESOURCE_LOCATION Location of macros TeX file (relative to webapp) | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides uk. | |
| TEX_SOURCE_BASE_RESOURCE | back to summary |
|---|---|
| private static final String TEX_SOURCE_BASE_RESOURCE Base Location for .tex source files (relative to webapp) | |
| DocumentationServlet | back to summary |
|---|---|
| public DocumentationServlet() | |
| doGet | back to summary |
|---|---|
| protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException Overrides javax. Doc from javax. Called by the server (via the Overriding this method to support a GET request also automatically supports an HTTP HEAD request. A HEAD request is a GET request that returns no body in the response, only the request header fields. When overriding this method, read the request data,
write the response headers, get the response's writer or
output stream object, and finally, write the response data.
It's best to include content type and encoding. When using
a The servlet container must write the headers before committing the response, because in HTTP the headers must be sent before the response body. Where possible, set the Content-Length header (with the
When using HTTP 1.1 chunked encoding (which means that the response has a Transfer-Encoding header), do not set the Content-Length header. The GET method should be safe, that is, without any side effects for which users are held responsible. For example, most form queries have no side effects. If a client request is intended to change stored data, the request should use some other HTTP method. The GET method should also be idempotent, meaning that it can be safely repeated. Sometimes making a method safe also makes it idempotent. For example, repeating queries is both safe and idempotent, but buying a product online or modifying data is neither safe nor idempotent. If the request is incorrectly formatted,
| |
| generateResource | back to summary |
|---|---|
| private File generateResource(final HttpServletRequest request, final String resourcePath, final String resourceBaseName, final String extension) throws ServletException, IOException Generates the documentation resource at the given path.
| |
| generateSnuggledFile | back to summary |
|---|---|
| private File generateSnuggledFile(final HttpServletRequest request, final InputStream texSourceStream, final String texSourceResourcePath, final WebPageOutputOptions. References Deprecated
See corresponding docs for further information. | |
| init | back to summary |
|---|---|
| public void init() throws ServletException Overrides javax. Doc from javax. A convenience method which can be overridden so that there's no need
to call Instead of overriding
| |
| mapResourcePath | back to summary |
|---|---|
| private File mapResourcePath(final String resourcePath) Maps a requested "resource path" to a file under our | |
SimpleMathMLImageSavingCallback that stores images in the
given output directory with the given base URL, using a very simple naming scheme.
| Access | Constructor and Description |
|---|---|
| public |
| imageOutputBaseURL | back to summary |
|---|---|
| private final String imageOutputBaseURL | |
| imageOutputDirectory | back to summary |
|---|---|
| private final File imageOutputDirectory | |
| ImageSavingCallback | back to summary |
|---|---|
| public ImageSavingCallback(final File imageOutputDirectory, final String imageOutputBaseURL) | |
| getImageName | back to summary |
|---|---|
| private String getImageName(int mathmlCounter) | |
| getImageOutputFile | back to summary |
|---|---|
| public File getImageOutputFile(int mathmlCounter) Implements abstract uk. Implements uk. Doc from uk. Implement if you want the resulting image to be written to a
| |
| getImageOutputStream | back to summary |
|---|---|
| public OutputStream getImageOutputStream(int mathmlCounter) Implements abstract uk. Implements uk. Doc from uk. Implement this if you want the resulting image to be written to an
| |
| getImageURL | back to summary |
|---|---|
| public String getImageURL(int mathmlCounter) Implements abstract uk. Implements uk. Doc from uk. Implement to return the URL String that will be put into the img src attribute to refer to the image.
| |
| imageSavingFailed | back to summary |
|---|---|
| public void imageSavingFailed(Object imageOutputObject, int mathmlCounter, String contentType, Throwable exception) Implements uk. Doc from uk. Called back if MathML image could not be saved for some reason. | |