org.jafer.servlet.xslt
Class XSLTRequestDispatcher
java.lang.Object
org.jafer.servlet.xslt.XSLTRequestDispatcher
- All Implemented Interfaces:
- javax.servlet.RequestDispatcher
public class XSLTRequestDispatcher
- extends java.lang.Object
- implements javax.servlet.RequestDispatcher
Constructor Summary |
XSLTRequestDispatcher(javax.servlet.ServletContext context,
java.lang.String xslUrl)
|
XSLTRequestDispatcher(javax.servlet.ServletContext context,
java.lang.String xslUrl,
java.lang.String resource)
|
XSLTRequestDispatcher(javax.servlet.ServletContext context,
java.lang.String xslUrl,
java.lang.String resource,
java.util.Locale locale)
|
XSLTRequestDispatcher(javax.servlet.ServletContext context,
java.lang.String xslUrl,
java.lang.String resource,
java.lang.String locale)
|
Method Summary |
private void |
constructor(javax.servlet.ServletContext context,
java.lang.String xslUrl,
java.lang.String resource,
java.util.Locale locale)
|
void |
forward(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Forwards a request from a servlet to another resource (servlet, JSP
file, or HTML file) on the server. |
private java.util.Map |
getLocaleResources(java.lang.String resourceName,
java.util.Locale locale)
|
void |
include(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Includes the content of a resource (servlet, JSP page, HTML file) in
the response. |
private void |
processXSLT(javax.servlet.ServletResponse response,
org.w3c.dom.Document xml,
java.util.Map xslParams,
java.util.Map urlParams)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transformerFactory
private static javax.xml.transform.TransformerFactory transformerFactory
domBuilder
private static javax.xml.parsers.DocumentBuilder domBuilder
templatesMap
private static java.util.Map templatesMap
context
private javax.servlet.ServletContext context
localeResources
private java.util.Map localeResources
templates
private javax.xml.transform.Templates templates
XSLTRequestDispatcher
public XSLTRequestDispatcher(javax.servlet.ServletContext context,
java.lang.String xslUrl)
throws javax.xml.transform.TransformerConfigurationException
- Throws:
javax.xml.transform.TransformerConfigurationException
XSLTRequestDispatcher
public XSLTRequestDispatcher(javax.servlet.ServletContext context,
java.lang.String xslUrl,
java.lang.String resource)
throws javax.xml.transform.TransformerConfigurationException
- Throws:
javax.xml.transform.TransformerConfigurationException
XSLTRequestDispatcher
public XSLTRequestDispatcher(javax.servlet.ServletContext context,
java.lang.String xslUrl,
java.lang.String resource,
java.lang.String locale)
throws javax.xml.transform.TransformerConfigurationException
- Throws:
javax.xml.transform.TransformerConfigurationException
XSLTRequestDispatcher
public XSLTRequestDispatcher(javax.servlet.ServletContext context,
java.lang.String xslUrl,
java.lang.String resource,
java.util.Locale locale)
throws javax.xml.transform.TransformerConfigurationException
- Throws:
javax.xml.transform.TransformerConfigurationException
constructor
private void constructor(javax.servlet.ServletContext context,
java.lang.String xslUrl,
java.lang.String resource,
java.util.Locale locale)
throws javax.xml.transform.TransformerConfigurationException
- Throws:
javax.xml.transform.TransformerConfigurationException
forward
public void forward(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Forwards a request from a servlet to another resource (servlet, JSP
file, or HTML file) on the server.
- Specified by:
forward
in interface javax.servlet.RequestDispatcher
- Parameters:
request
- a ServletRequest
object that represents the
request the client makes of the servletresponse
- a ServletResponse
object that represents the
response the servlet returns to the client
- Throws:
javax.servlet.ServletException
- if the target resource throws this exception
java.io.IOException
- if the target resource throws this exception
include
public void include(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Includes the content of a resource (servlet, JSP page, HTML file) in
the response.
- Specified by:
include
in interface javax.servlet.RequestDispatcher
- Parameters:
request
- a ServletRequest
object that contains the
client's requestresponse
- a ServletResponse
object that contains the
servlet's response
- Throws:
javax.servlet.ServletException
- if the included resource throws this
exception
java.io.IOException
- if the included resource throws this exception
getLocaleResources
private java.util.Map getLocaleResources(java.lang.String resourceName,
java.util.Locale locale)
processXSLT
private void processXSLT(javax.servlet.ServletResponse response,
org.w3c.dom.Document xml,
java.util.Map xslParams,
java.util.Map urlParams)
throws java.lang.Exception
- Throws:
java.lang.Exception