public class DynaXML extends TextServlet
| Modifier and Type | Field and Description |
|---|---|
(package private) Authenticator |
authenticator
Handles authentication
|
private DynaXMLConfig |
config
Holds global servlet configuration info
|
private DocLocator |
docLocator
Locator used to find lazy and non-lazy document files
|
stylesheetCache| Constructor and Description |
|---|
DynaXML() |
| Modifier and Type | Method and Description |
|---|---|
private void |
apply(DocRequest docReq,
HttpServletRequest req,
HttpServletResponse res)
Loads the source document, optionally performs a text search on it, and
then runs the document formatter to produce the final HTML result page.
|
protected boolean |
authenticate(DocRequest docReq,
HttpServletRequest req,
HttpServletResponse res)
Performs user authentication for a request, given the authentication
info for the document.
|
DocLocator |
createDocLocator()
Create a DocLocator.
|
void |
doGet(HttpServletRequest req,
HttpServletResponse res)
Handles the HTTP 'get' method.
|
private String |
getClientIP(HttpServletRequest req)
Retrieves the IP address of the client who is requesting a page from
this servlet.
|
TextConfig |
getConfig()
Retrieves the current configuration information (that was read in by
readConfig()).
|
String |
getConfigName()
Called by the superclass to find out the name of our specific config
file.
|
String |
getServletInfo()
Informational method required by Servlet interface.
|
protected Source |
getSourceDoc(DocRequest docReq,
Transformer transformer)
Does the work of locating and loading the source document.
|
protected TextConfig |
readConfig(String configPath)
Reads in the configuration file and sets up our helpers (caching,
authentication, etc.)
|
protected DocRequest |
runDocReqParser(HttpServletRequest req,
AttribList attribs)
Creates a document request by running the docReqParser stylesheet and
the given attributes.
|
void |
setProfiling(boolean flag)
Tells the servlet whether to perform stylesheet profiling.
|
addParam, addToken, addTokens, buildParamBlock, calcMimeType, convertUTF8inURL, cqlTokenize, createFilteredReceiver, createQueryProcessor, decodeURL, defaultTokenize, destroy, doPost, genErrorPage, getCurRequest, getCurResponse, getCurServlet, getRealPath, getRequestURL, getRequestURL, getText, isEmpty, isSessionTrackingEnabled, makeAttribList, makeHtmlString, makeHtmlString, rawTokenize, readBranding, requireOrElse, restoreWildcards, saveWildcards, service, setErrorGenSheet, setupTrace, stuffAttribs, stuffAttribs, stuffSpecialAttribsdoDelete, doHead, doOptions, doPut, doTrace, getLastModified, serviceAuthenticator authenticator
private DynaXMLConfig config
private DocLocator docLocator
public String getConfigName()
getConfigName in class TextServletprotected TextConfig readConfig(String configPath)
readConfig in class TextServletconfigPath - Path to the configuration filepublic TextConfig getConfig()
getConfig in class TextServletprivate String getClientIP(HttpServletRequest req)
req - The HTTP request being processedpublic void doGet(HttpServletRequest req,
HttpServletResponse res)
throws IOException
doGet in class TextServletreq - The HTTP requestres - The HTTP responseIOException - If unable to write the output stream.protected DocRequest runDocReqParser(HttpServletRequest req, AttribList attribs) throws Exception
req - The original HTTP requestattribs - Attributes to pass to the stylesheet.Exceptionprotected boolean authenticate(DocRequest docReq, HttpServletRequest req, HttpServletResponse res) throws Exception
docReq - Info structure containing authentication parametersreq - The request being processedres - Where to send results if authentication failsExceptionpublic String getServletInfo()
getServletInfo in interface ServletgetServletInfo in class GenericServletprivate void apply(DocRequest docReq, HttpServletRequest req, HttpServletResponse res) throws Exception
docReq - Document information (stylesheet, source, etc.)req - The original HTTP requestres - Where to send the HTML responseTransformerException - If there's an error in the stylesheet.IOException - If stylesheet or source can't be read.Exceptionprotected Source getSourceDoc(DocRequest docReq, Transformer transformer) throws IOException, SAXException, ParserConfigurationException, InvalidDocumentException
docReq - Tells which document to load, the query to
apply, tec.transformer - The XSLT transformer that will be used on the
document.IOException - If a problem is encountered loading a file or URLSAXException - If the document cannot be parsed as valid XMLParserConfigurationException - Miscellaneous configuration
problemsInvalidDocumentExceptionpublic DocLocator createDocLocator()
DefaultDocLocator is
created.public void setProfiling(boolean flag)
flag - If true, subsequent XSLT transformations will be
profiled.