|
jacquard 1.12.0 by The Web Engineering Factory and Toolworks | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
uk.co.weft.maybeupload.MaybeUploadServlet
uk.co.weft.htform.Servlet
uk.co.weft.htform.WithExceptionHandlerServlet
uk.co.weft.domutil.DocPage
a DocPage is a servlet which generates a page from a Document. This class (and consequently all servlets which are subclasses of this class) know about the following configuration parameters, in addition to those handled by Servlet:
org.w3c.dom.DOMImplementation
class to use. The class named must obviously be in the Web app's classpath.
Optional. Defaults to
org.apache.xerces.dom.DOMImplementationImpl. In addition, the DOMStub which is used by this class is aware of the following configuration parameters:
Note: only one DOMStub is started up per web application, so there is no point in setting the dom_ in individual servlet init_params; you should only configure these in global config_params.
DOMImplementation,
DocumentBuilderFactory.setCoalescing(boolean),
DocumentBuilderFactory.setExpandEntityReferences(boolean),
DocumentBuilderFactory.setIgnoringComments(boolean),
DocumentBuilderFactory.setIgnoringElementContentWhitespace(boolean).,
DocumentBuilderFactory.setNamespaceAware(boolean),
DocumentBuilderFactory.setValidating(boolean),
Serialized Form| Field Summary | |
static java.lang.String |
ACCEPTHEADER
the name of the Accept header |
static java.lang.String |
ACCEPTSXMLMAGICTOKEN
a magic token on which I shall cache, in the context, whether or not the client accepts XML |
static java.lang.String |
AXMLMIMETYPE
the mime type application/xml; see RFC 3023 |
protected Printer |
caxton
the DOM printer I'm going to use |
static java.lang.String |
chosenGeneratorMagicToken
Deprecated. use CHOSENGENERATORMAGICTOKEN |
static java.lang.String |
CHOSENGENERATORMAGICTOKEN
a magic token to hold the chosen generator in the context |
protected java.lang.String |
entitiesFileName
the name of my entities properties file, if any |
protected java.util.Vector |
generators
my document generators |
protected boolean |
processClientSide
whether I seek to offload XSL processing to client side |
static java.lang.String |
PROCESSCLIENTSIDECONFIGTOKEN
a token on which I shall look in my config for whether I should offload XSL processing to those clients which claim to be able to ahndle it |
protected TransformerFactory |
transformerFactory
A factory class for XSL transformers; this is Xalan 2 |
static java.lang.String |
TXMLMIMETYPE
the mime type text/xml; see RFC 3023 |
protected Document |
xslDocument
the XSL stylesheet as a document object |
protected java.lang.String |
xslStylesheetName
the name of the XSL stylesheet I am to use, if any |
static java.lang.String |
XSLTRANSFORMCONFIGTOKEN
a magic token on which I shall seek my XSL transform in the config-time context |
| Fields inherited from class uk.co.weft.htform.WithExceptionHandlerServlet |
EXCEPTIONHANDLERCLASSCONFIGTOKEN |
| Fields inherited from class uk.co.weft.maybeupload.MaybeUploadServlet |
allowOverwrite, maxUpload, saveUploadedFilesToDisk, silentlyRename, uploadDir, uploadDirPath, uploadDirURL |
| Fields inherited from interface uk.co.weft.htform.ResourceConsumer |
RESOURCEBUNDLEMAGICTOKEN |
| Constructor Summary | |
DocPage()
|
|
| Method Summary | |
protected boolean |
clientAcceptsXML(Context context)
Check whether we allow clientside processing and, if so, whether the client for this service claims to accept XML, and, by implication, to be capable of XSL processing client-side. |
void |
destroy()
Specialisation: A call to destroy me should tall all my generators first |
protected void |
generateContent(Context context)
Create a document with my document generator and send it to the output stream, passing it by way of my XSL stylesheet if I have one. |
protected void |
generateContent(Context context,
java.io.OutputStream out)
Create a document with my document generator and send it to this output stream, passing it by way of my XSL stylesheet if I have one. |
protected Document |
generateDocument(Context context)
Deprecated. obsolete, no longer called; specialisation is pointless. |
protected java.lang.String |
getContentType(Context context)
Return my content type in this context. |
protected Document |
getXSLDocument(Context context)
select an appropriate XSL transform for this context, and return it as a Document. |
void |
init(Context config)
Initialisation: Set up my variables from my configuration. |
protected void |
printDocument(Document doc,
java.io.OutputStream out)
Print this document onto this ouput stream |
protected Document |
tryGenerators(Context context)
try each of my generators in turn until one of them accepts the context and generates a document; cache the generator which accepted it on the service context |
| Methods inherited from class uk.co.weft.htform.WithExceptionHandlerServlet |
whinge, whinge, whinge |
| Methods inherited from class uk.co.weft.htform.Servlet |
addCookie, addCookie, coerceCookiesToContext, coerceToContext, coerceToContext, coerceToContext, coerceToContext, coerceToUrl, createContext, doGet, doPost, fixupMagicValues, getCalendar, getDebug, getLocale, getOutputStream, getResource, getResourceString, getServletInfo, grs, grs, handleAction, handleCookies, handleRedirect, init, makeReady, outputRedirectBlock, setCookieValues, storeOnSession |
| Methods inherited from class uk.co.weft.maybeupload.MaybeUploadServlet |
doDelete, doHead, doOptions, doPut, doTrace, getUploadDir, getUploadURL, service |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
| Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String PROCESSCLIENTSIDECONFIGTOKEN
public static final java.lang.String CHOSENGENERATORMAGICTOKEN
public static final java.lang.String chosenGeneratorMagicToken
public static final java.lang.String XSLTRANSFORMCONFIGTOKEN
public static final java.lang.String TXMLMIMETYPE
public static final java.lang.String AXMLMIMETYPE
public static final java.lang.String ACCEPTHEADER
public static final java.lang.String ACCEPTSXMLMAGICTOKEN
protected Document xslDocument
protected Printer caxton
protected java.lang.String entitiesFileName
protected java.lang.String xslStylesheetName
protected TransformerFactory transformerFactory
protected java.util.Vector generators
protected boolean processClientSide
| Constructor Detail |
public DocPage()
| Method Detail |
public void destroy()
public void init(Context config)
throws InitialisationException
init in class WithExceptionHandlerServletInitialisationExceptionprotected java.lang.String getContentType(Context context)
getContentType in class Servletcontext - the context for this service
protected Document getXSLDocument(Context context)
throws GenerationException
GenerationExceptionprotected boolean clientAcceptsXML(Context context)
context - the service context
protected void generateContent(Context context)
throws GenerationException,
java.io.IOException,
javax.servlet.ServletException
generateContent in class Servletcontext - the context for this service
java.io.IOException - if anything goes wrong while printing.
GenerationException - if anything goes wrong while generating
javax.servlet.ServletException - if cannot generate for other reasons
protected void generateContent(Context context,
java.io.OutputStream out)
throws GenerationException
context - the service contextout - the stream to print the result on
GenerationException - if anything goes wrong
protected Document generateDocument(Context context)
throws java.lang.Exception
java.lang.Exception
protected void printDocument(Document doc,
java.io.OutputStream out)
throws java.io.IOException
doc - the Document to printout - the stream to print it on
java.io.IOException - if anything goes wrong while printing.
protected Document tryGenerators(Context context)
throws java.lang.Exception
java.lang.Exception
|
jacquard 1.12.0 by The Web Engineering Factory and Toolworks | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||