jacquard 1.12.0 by The Web Engineering Factory and Toolworks

uk.co.weft.domutil
Class ClientsideXslSensitivePage

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byuk.co.weft.maybeupload.MaybeUploadServlet
              extended byuk.co.weft.htform.Servlet
                  extended byuk.co.weft.htform.WithExceptionHandlerServlet
                      extended byuk.co.weft.domutil.DocPage
                          extended byuk.co.weft.domutil.TransformPage
                              extended byuk.co.weft.domutil.CachedPage
                                  extended byuk.co.weft.domutil.ClientsideXslSensitivePage
All Implemented Interfaces:
ResourceConsumer, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

Deprecated. obsolete; all functionality moved up to DocPage and CachedPage as appropriate

public class ClientsideXslSensitivePage
extends CachedPage

The design of the domutil package has been largely predicated on the belief that XSL trasnformation had to be done server side. That made sense in 2000, when clients able to do XSL transforms client side were rare as hen's teeth. Increasingly, however, we can expect that most clients are XSL-capable, and it makes sense for a whole lot of reasons to offload XSL processing to client side. This servlet checks whether the client claims to be able to handle XML, and if so hands off the XSL processing to the client. See http://www.w3.org/TR/xml-stylesheet/

See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.co.weft.domutil.CachedPage
bufferBlockSize, cachePath, hits, locks, misses, REFRESHMAGICTOKEN, ttl, UPDATINGPAGECONFIGTOKEN, updatingPageURL, WHENLOCKEDERROR
 
Fields inherited from class uk.co.weft.domutil.TransformPage
transforms
 
Fields inherited from class uk.co.weft.domutil.DocPage
ACCEPTHEADER, ACCEPTSXMLMAGICTOKEN, AXMLMIMETYPE, caxton, chosenGeneratorMagicToken, CHOSENGENERATORMAGICTOKEN, entitiesFileName, generators, processClientSide, PROCESSCLIENTSIDECONFIGTOKEN, transformerFactory, TXMLMIMETYPE, xslDocument, xslStylesheetName, XSLTRANSFORMCONFIGTOKEN
 
Fields inherited from class uk.co.weft.htform.WithExceptionHandlerServlet
EXCEPTIONHANDLERCLASSCONFIGTOKEN
 
Fields inherited from class uk.co.weft.htform.Servlet
calendar, conf, contentType, CONTENTTYPECONFIGTOKEN, cookieDomain, cookiePath, COOKIESCONFIGTOKEN, cookieTTL, dbPassword, dbUrl, dbUsername, debug, DEBUGCONFIGTOKEN, driverName, embedded, here, identity, localeMagicToken, LOCALEMAGICTOKEN, outputStreamMagicToken, OUTPUTSTREAMMAGICTOKEN, parsePathInfo, PATHINFOMAGICTOKEN, ready, redirectMagicToken, REDIRECTMAGICTOKEN, requestMagicToken, REQUESTMAGICTOKEN, resourceBundleName, responseMagicToken, RESPONSEMAGICTOKEN, servletMagicToken, SERVLETMAGICTOKEN, sessionMagicToken, SESSIONMAGICTOKEN, USEHTTPSCONFIGTOKEN, zone
 
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
ClientsideXslSensitivePage()
          Deprecated.  
 
Method Summary
protected  Document generateDocument(Context context)
          Deprecated. obsolete, use generateContent(Context,OutputStream) instead
protected  java.lang.String getCacheName(Context context)
          Deprecated. we need to cache different content for clients which accept XML
 
Methods inherited from class uk.co.weft.domutil.CachedPage
checkLock, doPost, generateContent, init, useCache
 
Methods inherited from class uk.co.weft.domutil.TransformPage
getXSLDocument
 
Methods inherited from class uk.co.weft.domutil.DocPage
clientAcceptsXML, destroy, generateContent, getContentType, printDocument, tryGenerators
 
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, 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
 

Constructor Detail

ClientsideXslSensitivePage

public ClientsideXslSensitivePage()
Deprecated. 
Method Detail

getCacheName

protected java.lang.String getCacheName(Context context)
Deprecated. 
we need to cache different content for clients which accept XML

Overrides:
getCacheName in class CachedPage
Parameters:
context - The context of this request
Returns:
a unique file name for this request

generateDocument

protected Document generateDocument(Context context)
                             throws java.lang.Exception
Deprecated. obsolete, use generateContent(Context,OutputStream) instead

Does the 'Accept' header include either 'text/xml' or 'application/xml'? If so, do not transform locally; if not, do.

Overrides:
generateDocument in class DocPage
Parameters:
context - the service context
Throws:
java.lang.Exception

jacquard 1.12.0 by The Web Engineering Factory and Toolworks