com.jclark.xsl.sax
Class XSLServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.jclark.xsl.sax.XSLServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class XSLServlet
extends javax.servlet.http.HttpServlet

an example servlet which compiles and caches a stylesheet, then with each "GET" transforms the requested file

See Also:
Serialized Form

Constructor Summary
XSLServlet()
           
 
Method Summary
(package private) static org.xml.sax.Parser createParser()
           
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static org.xml.sax.InputSource fileInputSource(java.io.File file)
          Generates an InputSource from a file name.
 void init()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLServlet

public XSLServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

createParser

static org.xml.sax.Parser createParser()
                                throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

fileInputSource

public static org.xml.sax.InputSource fileInputSource(java.io.File file)
Generates an InputSource from a file name.